Description |
Parent class: XControl
XListBox |
XWindow * theOwner | The owning window | ||||||
XRect * rectangle | Position and size of the listbox | ||||||
USHORT ID | The ID of the window. Default is zero. | ||||||
ULONG style | The style of the window. Valid values are:
The values can be or-ed. | ||||||
char * font | font to use, e.g. "8.Helvetica" |
Construct a listbox
InsertItem |
char * theTitle | title of the item |
SHORT position | where to insert. You can specify the zero-based index, LS_LAST (the item is inserted at the end of the list), LS_ASCENDING (the items are sorted ascending) or LS_DESCENDING (items are sorted descending) Default is LS_LAST. |
SHORT the zero-based index of the item
Adds a an item to the listbox
RemoveAll |
BOOL result
Removes all items from a listbox.
RemoveItem |
SHORT theItem Zero-based index of the item to remove
Removes an item
GetCount |
SHORT the count of items in the listbox
Returns the count of items.
GetTopIndex |
SHORT index
Returns the index of the first visible entry.
SearchString |
char * theText | text to be searched | ||||||
SHORT startPosition | Zero-based index of item where to start the search | ||||||
SHORT matchCode | How to search. Valid values are:
LS_CASESSENSITIVE can be or-ed with one of the other defines. |
SHORT Zero-based index of the item which is found. If no item is found, LS_NONE is returned.
Search a string in the listbox
SetItemHeight |
SHORT height
Set items height
SetItemWidth |
SHORT width
Set items width
SetTopIndex |
SHORT index index of the first visible entry
Set the first visible entry.
GetSelection |
SHORT searchAfterItem Zero-based index of the item behind which the search starts (defaultt is LS_FIRST)
SHORT Zero-based index of the item found. If no item is found return is LS_NONE
Returns the zero-based index of the first selected item which is found after the specified item.
SelectItem |
SHORT theItem Zero-based index of the item to select
Select an item
GetItemText |
SHORT theItem Zero-based index of the item
XString * buffer buffer which will hold the text
SHORT length of the text
Get the text of an item
SetItemText |
SHORT theItem Zero-based index of the item
char * theText the new text
BOOL success
Set the text of an item.
GetItemHandle |
SHORT theItem Zero-based index of the item
LONG the handle of the item
Gets a handle of an item.
SetItemHandle |
SHORT theItem Zero-based index of the item which
will get the handle
LONG theHandle the handle which is add to the item
BOOL success
Adds a handle to an item