This class contains a label that precedes a combo box, which allows the user to select entries from a drop-down list.
Constructor.
Argument | Type | Default | Description |
p | FXComposite | Parent widget. | |
ncols | Int | Number of columns in the combo box (use 0 for auto-sizing). | |
nvis | Int | Number of visible items in the combo box's drop down list. | |
text | String | Label string. | |
tgt | FXObject | None | Message target. |
sel | Int | 0 | Message ID. |
opts | Int | 0 | Options and hints. |
x | Int | 0 | X coordinate of origin. |
y | Int | 0 | Y coordinate of origin. |
w | Int | 0 | Width of the widget. |
h | Int | 0 | Height of the widget. |
pl | Int | DEFAULT_PAD | Left padding (margin). |
pr | Int | DEFAULT_PAD | Right padding (margin). |
pt | Int | DEFAULT_PAD | Top padding (margin). |
pb | Int | DEFAULT_PAD | Bottom padding (margin). |
Adds an item to the end of the list.
Argument | Type | Default | Description |
text | String | Text. | |
sel | Int | 0 | Selector. |
Returns the data for the specified item.
Argument | Type | Default | Description |
index | Int | Index. |
Returns the index of the first item with the associated data or -1 if not found.
Argument | Type | Default | Description |
data |
Returns the index of the first item with the text evaluating to the given value.
Argument | Type | Default | Description |
val | Float |
Returns the text for the specified item.
Argument | Type | Default | Description |
index | Int | Index. |
Inserts a new item at the specified index position.
Argument | Type | Default | Description |
index | Int | Index. | |
text | String | Text. | |
sel | Int | 0 | Selector. |
Returns True if the item at the specified index position is the current item.
Argument | Type | Default | Description |
index | Int | Index. |
Removes the item at the specified index position from the list.
Argument | Type | Default | Description |
index | Int | Index. |
Replaces the item at the specified index position.
Argument | Type | Default | Description |
index | Int | Index. | |
text | String | Text. | |
sel | Int | 0 | Selector. |
Sets the state of the check button or the radio button.
Argument | Type | Default | Description |
state | Bool | Button state. |
Sets the message ID of the check button or the radio button.
Argument | Type | Default | Description |
sel | Int | Selector. |
Sets the message target of the check button or the radio button.
Argument | Type | Default | Description |
tgt | FXObject | Target. | |
checkVal | Bool | False | Value of check button. |
Sets the current item (the index is zero-based).
Argument | Type | Default | Description |
index | Int | Index. |
Sets the editable state for the input field.
Argument | Type | Default | Description |
edit | Bool | True | Editable state. |
Moves the focus to the input field and selects its contents if the combo box is editable.
Moves the focus to the check button or the radio button (if existed) of the widget.
Sets the status line help text.
Argument | Type | Default | Description |
text | String | Help text. |
Sets the data for the specified item.
Argument | Type | Default | Description |
index | Int | Index. | |
ptr | String | Data. |
Sets the provider of this object items.
Argument | Type | Default | Description |
cp | FXObject | Item provider. |
Sets the text for the specified item.
Argument | Type | Default | Description |
index | Int | Index. | |
text | String | Text. |
Sets the label font.
Argument | Type | Default | Description |
fnt | FXFont | Label font. |
Sets the label string.
Argument | Type | Default | Description |
txt | String | Label text. |
Sets the maximum number of visible items. The combo box will show up to the given maximum number of items in its list. If the combo box has more items, its list will show a scroll bar.
Argument | Type | Default | Description |
maxVis | Int | Maximum number of visible items. |
Sets the number of columns in the combo box; passing zero will cause the combo box to always have the number of columns equal to the maximum item length.
Argument | Type | Default | Description |
cols | Int | Number of columns. |
Sets the number of visible items.
Argument | Type | Default | Description |
nvis | Int | Number of visible items. |
Sets the read-only state of the combo box.
Argument | Type | Default | Description |
readonly | Bool | True | Read-only state. |
Sets the text displayed in the input field.
Argument | Type | Default | Description |
txt | String | Input field text. |
Sets the tool tip message.
Argument | Type | Default | Description |
text | String | Tooltip text. |
Message ID's.
ID_BUTTON | Label or button ID. |
ID_COMBO | Combo box ID. |
ID_INCREMENT | Up arrow button ID. |
ID_DECREMENT | Down arrow button ID. |
Flags for AFX combo box options.
AFXCOMBOBOX_CHECKBUTTON | Use a check button instead of a label. |
AFXCOMBOBOX_RADIOBUTTON | Use a radio button instead of a label. |
AFXCOMBOBOX_VERTICAL | Orient label or button above combo box. |
AFXCOMBOBOX_FLOAT | Allow interaction with float keywords. |
AFXCOMBOBOX_READONLY | Configure combo box to the read-only state. |
AFXCOMBOBOX_SPINNER | Include spinner buttons. |