wxComboBox
generated from ../src/mod_gui/control/combobox.cppA 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.
Constants
Style
| Name | Description |
|---|---|
| SIMPLE | |
| DROPDOWN | |
| READONLY | |
| SORT |
Constructor
wxComboBox
wxComboBox()
wxComboBox(Parent,
Id,
Text = "",
Position = wxDefaultPosition,
Size = wxDefaultSize,
Items = null,
Style = 0,
Validator = null)
| Name | Type | Default | Description |
|---|---|---|---|
| Parent | wxWindow | The parent of the wxComboBox | |
| Id | Integer | A window identifier. Use -1 when you don't need it | |
| Text | String | The default text of the text field | |
| Position | wxPoint | wxDefaultPosition | The position of the control on the given parent. |
| Size | wxSize | wxDefaultSize | The size of the control. |
| Items | Array | null | An array of Strings to initialize the control. |
| Style | Integer | 0 | The window style. |
| Validator | wxValidator | null | A validator |
Constructs a new wxComboBox object
Properties
Methods
copy
copy()
Copies the selected text to the clipboard
create
create(Parent,
Id,
Text = "",
Position = wxDefaultPosition,
Size = wxDefaultSize,
Items = null,
Style = 0,
Validator = null)
| Name | Type | Default | Description |
|---|---|---|---|
| Parent | wxWindow | The parent of the wxComboBox | |
| Id | Integer | A window identifier. Use -1 when you don't need it | |
| Text | String | The default text of the text field | |
| Position | wxPoint | wxDefaultPosition | The position of the control on the given parent. |
| Size | wxSize | wxDefaultSize | The size of the control. |
| Items | Array | null | An array of Strings to initialize the control. |
| Style | Integer | 0 | The window style. |
| Validator | wxValidator | null | A validator |
Creates a wxComboBox
cut
cut()
Copies the selected text to the clipboard and removes the selected text
paste
paste()
Pastes the content of the clipboard in the text field.
redo
redo()
Redoes the last undo in the text field. Windows only.
remove
remove(From,
To)
| Name | Type | Default | Description |
|---|---|---|---|
| From | Integer | ||
| To | Integer |
Removes the text between From and To
replace
replace(From,
To,
Text)
| Name | Type | Default | Description |
|---|---|---|---|
| From | Integer | ||
| To | Integer | ||
| Text | String |
Replaces the text between From and To with the given text
undo
undo()
Undoes the last edit in the text field. Windows only.
Events
| onText | Called when the text of the textfield is changed. The type of the argument that your handler receives is wxCommandEvent. |
| onComboBox | Called when an item is selected. The type of the argument that your handler receives is wxCommandEvent. |

© 2002 - 2007 Franky Braem.