index = WinXListBox_AddItem (hListBox, index, Item$)
Adds an item to a list box.
Parameter | Description |
---|---|
hListBox | The handle to the list box to add the item to |
index | The 0 based index at which to insert the item. Use -1 to add the item to the end if the list |
Item$ | The string representing the item |
The index at which the item was inserted, or $$LB_ERR on error.
If the list box is automatically sorted, the index parameter has no effect.
'insert an item to the begining of a list box IF WinXListBox_AddItem (hLB, 0, "An item in a list box") = $$LB_ERR THEN PRINT "ERROR" |