A radio box item is used to select one of number of mutually exclusive choices.
It is displayed as a vertical column or horizontal row of labelled buttons.
Styles
This class supports the following styles:
wxRA_SPECIFY_ROWS: The major dimension parameter refers to the maximum number of rows.
wxRA_SPECIFY_COLS: The major dimension parameter refers to the maximum number of columns.
See:
This class is derived, and can use functions, from:
wxWidgets docs: wxRadioBox
Events
Event types emitted from this class:
Summary
Functions
Creates the radiobox for two-step construction.
Destroys the object
Enables or disables the radiobox.
Enables or disables an individual button in the radiobox.
Returns the number of columns in the radiobox.
Returns a radio box item under the point, a zero-based item index, or wxNOT\_FOUND if
no item is under the point.
Returns the helptext associated with the specified item if any or wxEmptyString.
Returns the tooltip associated with the specified item if any or NULL.
Returns the number of rows in the radiobox.
Returns the index of the selected item or wxNOT\_FOUND if no item is selected.
Returns the label of the item with the given index.
Returns true if the item is enabled or false if it was disabled using enable/3.
Returns true if the item is currently shown or false if it was hidden using show/3.
Constructor, creating and showing a radiobox.
Sets the helptext for an item.
Sets the tooltip text for the specified item in the radio group.
Sets the selection to the given item.
Shows or hides individual buttons.
Types
-type wxRadioBox() :: wx:wx_object().
Functions
-spec create(This, Parent, Id, Label, Pos, Size, Choices) -> boolean() when This :: wxRadioBox(), Parent :: wxWindow:wxWindow(), Id :: integer(), Label :: unicode:chardata(), Pos :: {X :: integer(), Y :: integer()}, Size :: {W :: integer(), H :: integer()}, Choices :: [unicode:chardata()].
-spec create(This, Parent, Id, Label, Pos, Size, Choices, [Option]) -> boolean() when This :: wxRadioBox(), Parent :: wxWindow:wxWindow(), Id :: integer(), Label :: unicode:chardata(), Pos :: {X :: integer(), Y :: integer()}, Size :: {W :: integer(), H :: integer()}, Choices :: [unicode:chardata()], Option :: {majorDim, integer()} | {style, integer()} | {val, wx:wx_object()}.
Creates the radiobox for two-step construction.
See new/7 for further details.
destroy(This :: wxRadioBox()) -> ok
Destroys the object
-spec enable(This) -> boolean() when This :: wxRadioBox().
-spec enable(This, N) -> boolean() when This :: wxRadioBox(), N :: integer(); (This, [Option]) -> boolean() when This :: wxRadioBox(), Option :: {enable, boolean()}.
Enables or disables the radiobox.
See: wxWindow:enable/2
-spec enable(This, N, [Option]) -> boolean() when This :: wxRadioBox(), N :: integer(), Option :: {enable, boolean()}.
Enables or disables an individual button in the radiobox.
See: wxWindow:enable/2
getColumnCount(This :: wxRadioBox()) -> integer()
Returns the number of columns in the radiobox.
getItemFromPoint(This, Pt) -> integer()
Returns a radio box item under the point, a zero-based item index, or wxNOT\_FOUND if
no item is under the point.
getItemHelpText(This :: wxRadioBox(), Item :: integer()) -> unicode:charlist()
Returns the helptext associated with the specified item if any or wxEmptyString.
See: setItemHelpText/3
getItemToolTip(This :: wxRadioBox(), Item :: integer()) -> Result
Types
Result = wxToolTip:wxToolTip()
Returns the tooltip associated with the specified item if any or NULL.
See:
getRowCount(This :: wxRadioBox()) -> integer()
Returns the number of rows in the radiobox.
getSelection(This :: wxRadioBox()) -> integer()
Returns the index of the selected item or wxNOT\_FOUND if no item is selected.
Return: The position of the current selection.
Remark: This method can be used with single selection list boxes only, you should use wxListBox:getSelections/1
for the list boxes with wxLB_MULTIPLE style.
See:
getString(This :: wxRadioBox(), N :: integer()) -> unicode:charlist()
Returns the label of the item with the given index.
Return: The label of the item or an empty string if the position was invalid.
isItemEnabled(This :: wxRadioBox(), N :: integer()) -> boolean()
Returns true if the item is enabled or false if it was disabled using enable/3.
This function is currently only implemented in wxMSW, wxGTK, wxQT and wxUniversal and always returns true in the other ports.
isItemShown(This :: wxRadioBox(), N :: integer()) -> boolean()
Returns true if the item is currently shown or false if it was hidden using show/3.
Note that this function returns true for an item which hadn't been hidden even if the entire radiobox is not currently shown.
This function is currently only implemented in wxMSW, wxGTK, wxQT and wxUniversal and always returns true in the other ports.
-spec new(Parent, Id, Label, Pos, Size, Choices) -> wxRadioBox() when Parent :: wxWindow:wxWindow(), Id :: integer(), Label :: unicode:chardata(), Pos :: {X :: integer(), Y :: integer()}, Size :: {W :: integer(), H :: integer()}, Choices :: [unicode:chardata()].
-spec new(Parent, Id, Label, Pos, Size, Choices, [Option]) -> wxRadioBox() when Parent :: wxWindow:wxWindow(), Id :: integer(), Label :: unicode:chardata(), Pos :: {X :: integer(), Y :: integer()}, Size :: {W :: integer(), H :: integer()}, Choices :: [unicode:chardata()], Option :: {majorDim, integer()} | {style, integer()} | {val, wx:wx_object()}.
Constructor, creating and showing a radiobox.
See: create/8
Sets the helptext for an item.
Empty string erases any existing helptext.
See: getItemHelpText/2
Sets the tooltip text for the specified item in the radio group.
This function is currently only implemented in wxMSW and wxGTK2 and does nothing in the other ports.
See:
setSelection(This :: wxRadioBox(), N :: integer()) -> ok
Sets the selection to the given item.
Notice that a radio box always has selection, so n must be valid here and passing wxNOT_FOUND
is not allowed.
-spec show(This, Item) -> boolean() when This :: wxRadioBox(), Item :: integer().
-spec show(This, Item, [Option]) -> boolean() when This :: wxRadioBox(), Item :: integer(), Option :: {show, boolean()}.
Shows or hides individual buttons.
Return: true if the item has been shown or hidden or false if nothing was done because it already was in the requested state.
See: show/3