Jump to content
Sign in to follow this  

How do I use this - $LVS_EX_SUBITEMIMAGES

Recommended Posts


I have a listview:

$lisview = GUICtrlCreateListView("", 5, 5, 100, 100, -1, $LVS_EX_SUBITEMIMAGES)
_GUICtrlListView_AddColumn($listview, "col 1", 50)
_GUICtrlListView_AddColumn($listview, "col 2", 50)
_GUICtrlListView_AddColumn($listview, "col 3", 50)


GUICtrlCreateListViewItem only takes two arguements:

1 ~ the values eg "1|2|3"

2 ~ the listview ie $listview

How do include my imagelist?

$images = _GUIImageList_Create(32, 40, 5, 1, 5, 20)
_GUIImageList_AddBitmap($images, "path of pic 1")
_GUIImageList_AddBitmap($images, "path of pic 2")
_GUIImageList_AddBitmap($images, "path of pic 3")

There is nothing (I can find) in the help files. :)

Share this post

Link to post
Share on other sites

Have done.

If I use the UDF command: _GUICtrlListView_AddItem then the GUICtrlSetOnEvent doesn't work. So I have to use GUICtrlCreateListViewItem, and this command doesnt tell me how to use an image.

And.. I always... always... bash about using the HELP files for a good hour before bothering you guys.

So... I humbly await a solution

Share this post

Link to post
Share on other sites

Many thanks for your delving but my problem remains (=my ignorance).

GUICtrlSetOnEvent now doesn't work. How do I trap clicking/cursoring down in the listview below

$platforms = GUIctrlCreateListView("", 180, 5, 270, 580, -1, $LVS_EX_SUBITEMIMAGES)
_GUICtrlListView_AddColumn($platforms, "column 1", 200)
_GUICtrlListView_AddColumn($platforms, "column 2", 100)

In another function, this listview is cleared then populated

For $loop = 1 to 5
   $item = _GUICtrlListView_AddItem($platforms, $loop, $image_index)
   _GUICtrlListView_AddSubItem($platforms, $item, "stuff", 1)

Your help is much appreciated.

Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.