Jump to content

ListView Image Lists and Items


GaryFrost
 Share

Recommended Posts

This is a work in progress, hoping to get it completed and working 100% to get the functions into the Help file eventually.

Have Image list working with the Header of the ListView

Having problems with Image list and ListView Item

Appears to be a problem also if GUICtrlSetImage is used on a listview item when header images are used,

this might be my fault (still working on this)

Appears to be a refresh problem if set the width of the listview small enough to cause horizontal scrollbar to appear, use scrollbar and header image(s) get hosed.

http://www.autoitscript.com/fileman/users/gafrost/projects/Includes/Memory.au3

http://www.autoitscript.com/fileman/users/gafrost/projects/Includes/blue.bmp

http://www.autoitscript.com/fileman/users/gafrost/projects/Includes/green.bmp

http://www.autoitscript.com/fileman/users/gafrost/projects/Includes/TestListViewImages.au3

Input/help appreciated.

Paul has helped me get this going so far, thought I would put it out in the support section and see what happens.

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

*bump*

Clarification:

I can create an image list and hook it to the header of the listview.

Problem 1:

Can't hook Imagelist to the listview itself.

Problem 2:

Problem 1:

If Image List is used on header

and GuiCtrlSetImage is used on Item messes up images in header

Problem 3:

Problem 2:

If listview is horizontally scrollable then 1st image in header don't redraw properly.

Problem 3:

Hooking Image List to ListView seems to mess up Mask set on Header Images.

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

1.) For Listview "Report"-view you can only use small images

->:

...
Func _TestListViewImages()
...
$h_images2 = _GUICtrlListViewCreateImageList($image_width, $image_height, 0x0021, 0, 4, $LVSIL_SMALL)
...
_GuiCtrlListViewSetImageList($h_LV, $h_images2, $LVSIL_SMALL)
...

It seems to be some 'overlapping' of the image lists.

So if you change an icon for a listviewitem the same change happens to the imagelist of the header.

Maybe this is something strange like the fact that the first created imagelist-icon is used for all items...

3.) the refreshing thing is maybe similar to the strange effects we 'had' some versions before with column resizing - maybe you remember.

I just then implemented a refresh of the header.

However, if I disable this internal refresh the refreshing problem still exists.

So no more idea at the moment...will take a look again later...

Link to comment
Share on other sites

1.) For Listview "Report"-view you can only use small images

->:

...
Func _TestListViewImages()
...
$h_images2 = _GUICtrlListViewCreateImageList($image_width, $image_height, 0x0021, 0, 4, $LVSIL_SMALL)
...
_GuiCtrlListViewSetImageList($h_LV, $h_images2, $LVSIL_SMALL)
...

It seems to be some 'overlapping' of the image lists.

So if you change an icon for a listviewitem the same change happens to the imagelist of the header.

Maybe this is something strange like the fact that the first created imagelist-icon is used for all items...

3.) the refreshing thing is maybe similar to the strange effects we 'had' some versions before with column resizing - maybe you remember.

I just then implemented a refresh of the header.

However, if I disable this internal refresh the refreshing problem still exists.

So no more idea at the moment...will take a look again later...

Once again thanks for your time/info Holger.

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...