Modify

Opened 16 years ago

Closed 16 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 Changed 16 years ago by TicketCleanup

  • Version 3.2.10.0 deleted

Automatic ticket cleanup.

comment:2 Changed 16 years ago by Jpm

  • Resolution set to Rejected
  • Status changed from new to closed

Sorry, but none AutoIt function can depend of an UDF.
You can build your own UDF GUICtrlCreateListViewItemEX($itemtext, $ListView1, $index [,$imagefile])

comment:3 Changed 16 years ago by Zedna

  • Resolution Rejected deleted
  • Status changed from closed to 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 Changed 16 years ago by Zedna

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 Changed 16 years ago by Valik

  • Resolution set to Rejected
  • Status changed from reopened to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.