Jump to content

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)

However:

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. :)

Link to comment
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

Link to comment
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

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

Your help is much appreciated.

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...