A combobox that displays bitmap in front of the list items. It currently only allows using bitmaps of one size, and resizes itself so that a bitmap can be shown next to the text field.
While BitmapComboBox contains the ComboBox API, but it might not actually be derived from that class. In fact, if the platform does not have a native implementation, BitmapComboBox will inherit from OwnerDrawnComboBox. You can determine if the implementation is generic by checking whether GENERIC_BITMAPCOMBOBOX is defined.
CB_READONLY |
Creates a combobox without a texteditor. On some platforms the control may appear very different when thisstyle is used. |
CB_SORT |
Sorts the entries in the list alphabetically. |
TE_PROCESS_ENTER |
The control will generatethe event EVT_COMMAND_TEXT_ENTER (otherwise pressing Enter keyis either processed internally by the control or used for navigation betweendialog controls). Windows only. |
See also window styles overview.
| evt_combobox(id) { | event | ... } | Process a EVT_COMMAND_COMBOBOX_SELECTED event,when an item on the list is selected. |
| evt_text(id) { | event | ... } | Process a EVT_COMMAND_TEXT_UPDATED event,when the combobox text changes. |
| evt_text_enter(id) { | event | ... } | Process a EVT_COMMAND_TEXT_ENTER event,when |
ComboBox, Choice, OwnerDrawnComboBox, CommandEvent
BitmapComboBox.new(Window parent, Integer id,
String value = "",
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE,
Integer n = 0,
String choices[] = nil,
Integer style = 0,
Validator validator = DEFAULT_VALIDATOR,
String name = "comboBox")
BitmapComboBox.new(Window parent, Integer id, String value,
Point pos,
Size size,
ArrayString choices,
Integer style = 0,
Validator validator = DEFAULT_VALIDATOR,
String name = "comboBox")
Constructor, creating and showing a combobox.
BitmapComboBox#create, Validator
Boolean create(Window parent, Integer id, String value = "",
Point pos = DEFAULT_POSITION,
Size size = DEFAULT_SIZE,
Integer n,
String choices[],
Integer style = 0,
Validator validator = DEFAULT_VALIDATOR,
String name = "comboBox")
Boolean create(Window parent, Integer id, String value,
Point pos,
Size size,
ArrayString choices,
Integer style = 0,
Validator validator = DEFAULT_VALIDATOR,
String name = "comboBox")
Creates the combobox for two-step construction. Derived classes should call or replace this function. See BitmapComboBox.new for further details.
Integer append(String item,
Bitmap bitmap = Wx::NULL_BITMAP)
Adds the item to the end of the combo box.
Integer append(String item,
Bitmap bitmap,
Object item_data)
Adds the item to the end of the combo box, associating the given item data with the item. As with other controls with items, any normal ruby object may be set as item data.
Size get_bitmap_size()
Returns size of bitmaps used in the list.
Bitmap get_item_bitmap(unsigned int n)
Returns the bitmap of the item with the given index.
Integer insert(String item,
Bitmap bitmap,
Integer pos)
Inserts the item into the list before pos. Not valid for CB_SORT
style, use append instead.
Integer insert(String item,
Bitmap bitmap,
Integer pos,
Object item_data)
Inserts the item into the list before pos, associating the given item
data with the item. Not valid for CB_SORT style, use
append instead.
set_item_bitmap(Integer n, Bitmap bitmap)
Sets the bitmap for the given item.
[This page automatically generated from the Textile source at Thu May 01 00:50:33 +0100 2008]