proc getCount(self: wComboBox): int {...}{.inline, raises: [], tags: [].}
-
Returns the number of items in the control.
proc len(self: wComboBox): int {...}{.inline, raises: [], tags: [].}
-
Returns the number of items in the control.
proc getText(self: wComboBox; index: int): string {...}{.raises: [], tags: [].}
-
Returns the text of the item with the given index.
proc `[]`(self: wComboBox; index: int): string {...}{.inline, raises: [IndexDefect], tags: [].}
-
Returns the text of the item with the given index. Raise error if index out of bounds.
proc insert(self: wComboBox; pos: int; text: string) {...}{.inline, raises: [], tags: [].}
-
Inserts the given string before the specified position. Notice that the inserted item won't be sorted even the listbox has wCbSort style. If pos is -1, the string is added to the end of the list.
proc insert(self: wComboBox; pos: int; list: openArray[string]) {...}{.inline, raises: [],
tags: [].}
-
Inserts multiple strings in the same time.
proc append(self: wComboBox; text: string) {...}{.inline, raises: [], tags: [].}
-
Appends the given string to the end. If the combobox has the wCbSort style, the string is inserted into the list and the list is sorted.
proc append(self: wComboBox; list: openArray[string]) {...}{.inline, raises: [], tags: [].}
-
Appends multiple strings in the same time.
proc delete(self: wComboBox; index: int) {...}{.inline, raises: [], tags: [].}
-
Delete a string in the combobox.
proc delete(self: wComboBox; text: string) {...}{.inline, raises: [], tags: [].}
-
Search and delete the specified string in the combobox.
proc clear(self: wComboBox) {...}{.inline, raises: [], tags: [].}
-
Remove all items from a combobox.
proc findText(self: wComboBox; text: string): int {...}{.inline, raises: [], tags: [].}
-
Finds an item whose label matches the given text.
proc getSelection(self: wComboBox): int {...}{.inline, raises: [], tags: [].}
-
Returns the index of the selected item or wNotFound(-1) if no item is selected.
proc select(self: wComboBox; index: int) {...}{.inline, raises: [], tags: [].}
-
Sets the selection to the given index or removes the selection entirely if index == wNotFound(-1).
proc setSelection(self: wComboBox; index: int) {...}{.inline, raises: [], tags: [].}
-
The same as select().
proc setText(self: wComboBox; index: int; text: string) {...}{.raises: [], tags: [].}
-
Changes the text of the specified combobox item.
proc changeValue(self: wComboBox; text: string) {...}{.raises: [], tags: [].}
-
Sets the text for the combobox text field. Notice that this proc won't generate wEvent_Text event.
proc setValue(self: wComboBox; text: string) {...}{.inline, raises: [Exception],
tags: [RootEffect].}
-
Sets the text for the combobox text field. Notice that this proc will generate wEvent_Text event.
proc getValue(self: wComboBox): string {...}{.inline, raises: [], tags: [].}
-
Gets the text for the combobox text field.
proc isListEmpty(self: wComboBox): bool {...}{.inline, raises: [], tags: [].}
-
Returns true if the list of combobox choices is empty.
proc isTextEmpty(self: wComboBox): bool {...}{.inline, raises: [], tags: [].}
-
Returns true if the text of the combobox is empty.
proc isPopup(self: wComboBox): bool {...}{.inline, raises: [], tags: [].}
-
Returns whether or not the listbox is popup.
proc popup(self: wComboBox) {...}{.inline, raises: [], tags: [].}
-
Shows the listbox portion of the combobox.
proc dismiss(self: wComboBox) {...}{.inline, raises: [], tags: [].}
-
Hides the listbox portion of the combobox.
proc getEditControl(self: wComboBox): wTextCtrl {...}{.inline, raises: [], tags: [].}
-
Returns the text control part of this combobox, or nil if no such control.
proc getTextCtrl(self: wComboBox): wTextCtrl {...}{.inline, raises: [], tags: [].}
-
Returns the text control part of this combobox, or nil if no such control. The same as getEditControl().
proc getListControl(self: wComboBox): wListBox {...}{.inline, raises: [], tags: [].}
-
Returns the list control part of this combobox, or nil if no such control.
proc init(self: wComboBox; parent: wWindow; id = wDefaultID; value: string = "";
pos = wDefaultPoint; size = wDefaultSize; choices: openArray[string] = [];
style: wStyle = wCbDropDown) {...}{.raises: [wNilAccess, wWindowError,
wCursorError, wBrushError, Exception, IndexDefect, wFontError, wError],
tags: [RootEffect].}
-
Initializes a combobox.
proc ComboBox(parent: wWindow; id = wDefaultID; value: string = ""; pos = wDefaultPoint;
size = wDefaultSize; choices: openArray[string] = [];
style: wStyle = wCbDropDown): wComboBox {...}{.inline, discardable, raises: [
wNilAccess, wWindowError, wCursorError, wBrushError, Exception, IndexDefect,
wFontError, wError], tags: [RootEffect].}
-
Constructor.