A combobox is like a combination of an edit control and a listbox.
It can be displayed as static list with editable or read-only text field; or a drop-down list with text field; or a drop-down list without a text field depending on the platform and presence of wxCB_READONLY style.
A combobox permits a single selection only. Combobox items are numbered from zero.
If you need a customized combobox, have a look at
Please refer to
Styles
This class supports the following styles:
See:
This class is derived (and can use functions) from:
wxWidgets docs:
Event types emitted from this class:
Default constructor.
Constructor, creating and showing a combobox.
See:
Destructor, destroying the combobox.
Returns true if the selection can be copied to the clipboard.
Returns true if the selection can be cut to the clipboard.
Returns true if the contents of the clipboard can be pasted into the text control.
On some platforms (Motif, GTK) this is an approximation and returns true if the control is editable, false otherwise.
Returns true if there is a redo facility available and the last operation can be redone.
Returns true if there is an undo facility available and the last operation can be undone.
Copies the selected text to the clipboard.
Copies the selected text to the clipboard and removes it from the control.
Same as
Note: Under wxMSW, this function always returns 0 if the combobox doesn't have the focus.
Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control.
Gets the contents of the control.
Notice that for a multiline text control, the lines will be separated by (Unix-style)
Pastes text from the clipboard to the text item.
If there is a redo facility and the last operation can be redone, redoes the last operation.
Does nothing if there is no redo facility.
Replaces the text starting at the first position up to (but not including) the character at the last position with the given text.
This function puts the current insertion point position at
Removes the text starting at the first given position up to (but not including) the character at the last position.
This function puts the current insertion point position at
Sets the insertion point at the given position.
Sets the insertion point at the end of the text control.
This is equivalent to calling
Sets the selection to the given item
Note that this does not cause any command events to be emitted nor does it deselect any other items in the controls which support multiple selections.
See:
Same as
Sets the text for the combobox text field.
For normal, editable comboboxes with a text entry field calling this method will generate a
For controls with
If there is an undo facility and the last operation can be undone, undoes the last operation.
Does nothing if there is no undo facility.