class Fox::FXComboBox

An FXComboBox provides a way to select a string from a list of strings. Unless COMBOBOX_STATIC is passed, it also allows the user to enter a new string into the text field, for example if the desired entry is not in the list of strings. Passing COMBOBOX_REPLACE, COMBOBOX_INSERT_BEFORE, COMBOBOX_INSERT_AFTER, COMBOBOX_INSERT_FIRST, or COMBOBOX_INSERT_LAST causes a newly entered text to replace the current one in the list, or be added before or after the current entry, or to be added at the beginning or end of the list. FXComboBox is intended to enter text; if you need to enter a choice from a list of options, it is recommended that the FXListBox widget is used instead. When the text in the field is changed, a SEL_COMMAND will be send to the target. The FXComboBox can also receive ID_GETSTRINGVALUE and ID_SETSTRINGVALUE and so on, which will behave similar to FXTextField in that they will retrieve or update the value of the field.

Events

The following messages are sent by FXComboBox to its target:

SEL_CHANGED

sent when the text in the text field changes; the message data is a String containing the new text.

SEL_COMMAND

sent when a new item is selected from the list, or when a command message is sent from the text field; the message data is a String containing the new text.

ComboBox styles

COMBOBOX_NO_REPLACE

Leave the list the same

COMBOBOX_REPLACE

Replace current item with typed text

COMBOBOX_INSERT_BEFORE

Typed text inserted before current

COMBOBOX_INSERT_AFTER

Typed text inserted after current

COMBOBOX_INSERT_FIRST

Typed text inserted at begin of list

COMBOBOX_INSERT_LAST

Typed text inserted at end of list

COMBOBOX_STATIC

Unchangable text box

COMBOBOX_NORMAL

Default options for comboboxes

Message identifiers

ID_LIST

identifier associated with the embedded FXList instance

ID_TEXT

identifier associated with the embedded FXTextField instance