back to gui 

wxControlWithItems

generated from ../src/mod_gui/control/ctrlitem.cpp

This class is a prototype for some wxWidgets controls which contain several items, such as wxListBox, wxCheckListBox, wxChoice and wxComboBox.

It defines the methods for accessing the controls items.

Constants

Properties

Name Type Description
count read only Integer The number of items
empty read only Boolean Returns true when the control has no items
item wxControlItem This is an 'array' property. This means that you have to specify an index to retrieve the actual item. An example: choice.item[0].value = "BMW";
selection Integer Get/Set the selected item
stringSelection String Get the label of the selected item or an empty string when no item is selected. Or select the item with the given string.

Methods

append

append(Item) : Integer
 
Name Type Default Description
Item String
append(Items)
 
Name Type Default Description
Items Array

Adds the item or all elements of the array to the end of the control. When only one item is appended, the return value is the index of the newly added item.

clear

clear()
 

Removes all items from the control.

deleteItem

deleteItem(Index)
 
Name Type Default Description
Index Integer

Removes the item with the given index (zero-based).

findString

findString(Search) : Integer
 
Name Type Default Description
Search String

Returns the zero-based index of the item with the given search text. -1 is returned when the string was not found.

insert

insert(Item, 
       Pos) : Integer
 
Name Type Default Description
Item String
Pos Integer

Inserts the item into the list before pos. Not valid for wxListBox.SORT or wxComboBox.SORT styles, use Append instead. The returned value is the index of the new inserted item.




Design downloaded from Zeroweb.org: Free website templates, layouts, and tools.