A combobox is like a combination of an edit control and a listbox.

Notice: a combobox may recieve events propagated from its child text control. (wEvent_Text, wEvent_TextUpdate, wEvent_TextMaxlen etc.) In these case, event.window should be the child text control, not combobox itself.

wCbSimpleCreates a combobox with a permanently displayed list.
wCbDropDownCreates a combobox with a drop-down list.
wCbReadOnlyAllows the user to choose from the list but doesn't allow to enter a value.
wCbSortSorts the entries in the list alphabetically.
wCbNeededScrollOnly create a vertical scrollbar if needed.
wCbAlwaysScrollAlways show a vertical scrollbar.
wCbAutoHScrollAutomatically scrolls the text in an edit control to the right when the user types a character at the end of the line.
wEvent_ComboBoxWhen an item on the list is selected, calling getValue() returns the new value of selection.
wEvent_ComboBoxCloseUpWhen the listbox of the combobox disappears.
wEvent_ComboBoxDropDownWhen the listbox part of the combobox is shown.
wEvent_TextWhen the text changes.
wEvent_TextUpdateWhen the control is about to redraw itself.
wEvent_TextMaxlenWhen the user tries to enter more text into the control than the limit.
wEvent_TextEnterWhen pressing Enter key.
wEvent_CommandSetFocusWhen the control receives the keyboard focus.
wEvent_CommandKillFocusWhen the control loses the keyboard focus.
wEvent_CommandLeftDoubleClickDouble-clicked the left mouse button within the control.


wCbSimple = 0x00000001
wCbDropDown = 0x00000002
wCbReadOnly = 0x00000003
wCbSort = 0x00000100
wCbNeededScroll = 0x00200000
wCbAlwaysScroll = 2099200
wCbAutoHScroll = 0x00000040


proc getText(self: wComboBox; index: int): string {...}{.raises: [], tags: [].}
Returns the text of the item with the given index.