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.
A combobox permits a single selection only. Combobox items are numbered from zero.
CB_SIMPLE |
Creates a combobox with a permanently displayed list. Windows only. |
CB_DROPDOWN |
Creates a combobox with a drop-down list. |
CB_READONLY |
Same as CB_DROPDOWN but only thestrings specified as the combobox choices can be selected, it is impossible toselect (even from a program) a string which is not in the choices list. |
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. Note that calling"get_value":#ComboBox_getvalue returns the new value of selection. |
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 |
ListBox, TextCtrl, Choice,
CommandEvent
Constructor, creating and showing a combobox.
Creates the combobox for two-step construction. Derived classes should call or replace this function. See ComboBox.new for further details.
Returns true if the combobox is editable and there is a text selection
to copy to the clipboard.
Only available on Windows.
Returns true if the combobox is editable and there is a text selection to copy to the clipboard.
Only available on Windows.
Returns true if the combobox is editable and there is text on the clipboard that can be pasted into the
text field. Only available on Windows.
Returns true if the combobox is editable and the last undo can be redone.
Only available on Windows.
Returns true if the combobox is editable and the last edit can be undone.
Only available on Windows.
Copies the selected text to the clipboard.
Copies the selected text to the clipboard and removes the selection.
This function does the same things as
Choice#get_current_selection and
returns the item currently selected in the dropdown list if it’s open or the
same thing as get_selection otherwise.
Returns the insertion point for the combobox’s text field.
Note: Under MSW, this function always returns 0 if the combobox
doesn’t have the focus.
Returns the last position in the combobox text field.
This is the same as
TextCtrl#get_selection
for the text control which is part of the combobox, returning the
start and end position of the text selection.
Currently this method is only implemented in MSW and GTK.
Returns the current value in the combobox text field.
Pastes text from the clipboard to the text field.
Redoes the last undo in the text field. Windows only.
Replaces the text between two positions with the given text, in the combobox text field.
Removes the text between the two positions in the combobox text field.
Sets the insertion point in the combobox text field.
Sets the insertion point at the end of the combobox text field.
Selects the text between the two positions, in the combobox text field.
Sets the text for the combobox text field.
NB: For a combobox with CB_READONLY
style the string must be in
the combobox choices list, otherwise the call to SetValue() is ignored.
Undoes the last edit in the text field. Windows only.
[This page automatically generated from the Textile source at 2023-06-09 00:45:31 +0000]