WinXListView_AddItem


iItem = WinXListView_AddItem (hLV, iItem, STRING item, iIcon)

Adds an item to a list view control

Parameter Description
hLV The handle to the list view control to add the item to
iItem The index at which to add the item or -1 to add to the end
STRING item The label for the item, plus the sub items demilited by "\0"
iIcon The index to the icon or -1 if there is no icon

Returns

The 0 based index for the newly added item

Remarks

The item parameter describes not only the item label but also the text for the sub items. The strings are listed in order and delimited with "\0" . For example: The string "Label \0SubItem 1\0SubItem 2" defines the label as "Label", sub item 1 as "SubItem 1" and sub item 2 as "SubItem 2" .

Examples

' Append an item to a list view control with no icon
iItem = WinXListView_AddItem (hLV, -1, "Item X \0123 \0456 \0789", -1)

Related Links

List View Controls
WinXAddListView
WinXListView_AddColumn
WinXListView_DeleteItem
WinXListView_SetItemText
WinXListView_GetItemText
WinXListView_Sort