dazza Posted July 6, 2009 Posted July 6, 2009 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.
KaFu Posted July 6, 2009 Posted July 6, 2009 Take a look at the standard UDF functions _GUIImageList_Create() and _GUICtrlListView_SetImageList(). OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
dazza Posted July 6, 2009 Author Posted July 6, 2009 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
Zedna Posted July 6, 2009 Posted July 6, 2009 Search forum:http://www.autoitscript.com/forum/index.ph...st&p=514489 Resources UDF ResourcesEx UDF AutoIt Forum Search
dazza Posted July 6, 2009 Author Posted July 6, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now