|
public
QueryCount
SearchString
~XListBox
constructors/destructors
XListBox
inserting/removing
InsertItem
RemoveAll
RemoveItem
set/query selection
QuerySelection
SelectItem
text input/output
QueryItemText
SetItemText
using handles
QueryItemHandle
SetItemHandle
|
Derrived | : public XControl
|
|
|
Returns the count of items
Parameter: -
|
Definition | SHORT QueryCount ( void )
|
Returns | SHORT
SHORT the count of items in the listbox
|
|
Search a string in the listbox
Parameter: 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_CASESENSITIVE search casesensitive
LS_PREFIX search-string must be at the beginning
of the items title
LS_SUBSTRING search-string can be in the middle of
the items title
LS_CASESSENSITIVE can be or-ed with one of the other defines.
|
Definition | SHORT SearchString ( const char* p, SHORT start, SHORT match )
SHORT SearchString ( const char* p, SHORT start=LS_FIRST, SHORT matchCode=LS_CASESENSITIVE ) |
Returns | SHORT
SHORT Zero-based index of the item which is found. If no item
is found, LS_NONE is returned.
|
|
Definition | virtual ~XListBox ( ) |
|
|
Construct a listbox
|
Definition | XListBox ( XWindow* owner, XRect* rec, USHORT id, ULONG style )
XListBox ( XRect* rec, ULONG style, XWindow* owner, USHORT id, PSZ className )
XListBox ( HWND hwnd )
XListBox ( XWindow* owner, XRect* rec, USHORT id = 0, ULONG style = WIN_VISIBLE )
|
Parameters | : 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:
LS_SCROLL the listbox gets a horizontal scrollbar
LS_MULTI one ore more items can be selected
LS_EXTENDED extended selection is enabled (should be
used if LS_MULTI is specified).
The values can be or-ed.
|
Returns | -
|
|
|
Adds a an item to the listbox
Parameter: char * theTitle title of the item
SHORT position where to insert. You can specifythe 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.
|
Definition | SHORT InsertItem ( const char* item, SHORT pos )
SHORT InsertItem ( const char* item, SHORT pos = LS_LAST )
|
Returns | SHORT
SHORT the zero-based index of the item
|
|
Removes all items from a listbox
|
Definition | BOOL RemoveAll ( void )
|
Parameters | : -
|
Returns | BOOL
BOOL
|
|
Removes an item
Parameter: SHORT theItem Zero-based index of the item to remove
|
Definition | void RemoveItem ( SHORT pos )
|
Returns | void
-
|
|
|
Returns the zero-based index of the first selected item
which is found after the specified item
|
Definition | SHORT QuerySelection ( SHORT start )
SHORT QuerySelection ( SHORT start = LS_FIRST )
|
Parameters | : SHORT searchAfterItem Zero-based index of the item behind which
the search starts (defaultt is LS_FIRST)
|
Returns | SHORT
SHORT Zero-based index of the item found. If
no item is found return is LS_NONE
|
|
Select an item
Parameter: SHORT theItem Zero-based index of the item to select
|
Definition | BOOL SelectItem ( SHORT pos, BOOL select )
BOOL SelectItem ( SHORT pos, BOOL select = TRUE )
|
Returns | BOOL
-
|
|
|
Query the text of an item
Parameter: SHORT theItem Zero-based index of the item
XString * buffer buffer which will hold the text
|
Definition | SHORT QueryItemText ( SHORT pos, XString* buffer )
|
Returns | SHORT
SHORT length of the text
|
|
Set the text of an item
Parameter: SHORT theItem Zero-based index of the item
char * theText the new text
|
Definition | BOOL SetItemText ( SHORT pos, const char* p )
|
Returns | BOOL
BOOL success
|
|
|
querys a handle of an item
Parameter: SHORT theItem Zero-based index of the item
|
Definition | LONG QueryItemHandle ( SHORT pos )
|
Returns | LONG
LONG the handle of the item
|
|
Adds a handle to an item
Parameter: SHORT theItem Zero-based index of the item which
will get the handle
LONG theHandle the handle which is add to the item
|
Definition | BOOL SetItemHandle ( SHORT pos, LONG handle )
|
Returns | BOOL
BOOL success
|