Opened 18 years ago
Closed 18 years ago
#204 closed Feature Request (Rejected)
GUICtrlCreateListViewItem() - new optional parameter IconIndex
| Reported by: | Zedna | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | ||
| Keywords: | Cc: |
Description
GUICtrlCreateListViewItem() - new optional parameter IconIndex
$iImage - Zero based index of the item's icon in the control's image list
This new parameter will be optional so no backward compatibility problems.
It should be the same as it's in _GUICtrlListView_AddItem() UDF
_GUICtrlListView_AddItem($hWnd, $sText[, $iImage = -1])
$iImage - Zero based index of the item's icon in the control's image list
Maybe the same apply also for GUICtrlCreateTreeViewItem()
_GUICtrlTreeView_Add($hWnd, $hSibling, $sText[, $iImage = -1[, $iSelImage = -1]])
$iImage - Zero based index of the item's icon in the control's image list
$iSelImage - Zero based index of the item's icon in the control's image list
*
Idea comes from my Log_View project (see my sig on the forum)
where I create many ListView items by GUICtrlCreateListViewItem() and then I use GUICtrlSetImage(-1, @ScriptFullPath, $index) to set icon for just created ListViewItem item based on index from EXE icons in resources. But this is very slow because there is internally called ExtractIcon (fileoperations) and so on - for each item inside LOOP.
$index = ... GUICtrlCreateListViewItem($itemtext, $ListView1) GUICtrlSetImage(-1, @ScriptFullPath, $index)
should be
$index = ... GUICtrlCreateListViewItem($itemtext, $ListView1, $index)
Of course at start of script will be _GUICtrlListView_SetImageList () in this case.
Attachments (0)
Change History (5)
comment:1 by , 18 years ago
| Version: | 3.2.10.0 |
|---|
comment:2 by , 18 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | new → closed |
Sorry, but none AutoIt function can depend of an UDF.
You can build your own UDF GUICtrlCreateListViewItemEX($itemtext, $ListView1, $index [,$imagefile])
comment:3 by , 18 years ago
| Resolution: | Rejected |
|---|---|
| Status: | closed → reopened |
Sorry, but none AutoIt function can depend of an UDF.
If none AutoIt function can depend of an UDF then just add _GUICtrlListView_SetImageList() as native one GUICtrlListView_SetImageList()
This will be very simple change and will make much more flexible icons operations with ListView/TreeView with native functions.
You can build your own UDF GUICtrlCreateListViewItemEX($itemtext, $ListView1, $index [,$imagefile])
I thought about that already but creating ListView items by UDF functions is much more slower (several times!) then native one. See this post about that: http://www.autoitscript.com/forum/index.php?showtopic=67829
comment:4 by , 18 years ago
Sorry.
In my previous post where I wanted to add GUICtrlListView_SetImageList()
I didn't consider that also all imagelist's functions from GuiImageList.au3 include must be added as native too based on
Sorry, but none AutoIt function can depend of an UDF.
comment:5 by , 18 years ago
| Resolution: | → Rejected |
|---|---|
| Status: | reopened → closed |

Automatic ticket cleanup.