wxRadioBox(3)
π wxRadioBox π
okay bestie, welcome to the wxRadioBox page β straight outta the Erlang module definitions, and yes it's giving iconic. β¨
πΈ NAME πΈ
wxRadioBox β a radio box item is used to select one of a number of mutually exclusive choices. you pick ONE. that's the whole vibe. π
π¦ DESCRIPTION π¦
it shows up as a vertical column or a horizontal row of labelled buttons. literally that's it, that's the aesthetic. π
β¨ Styles β¨
this class supports the following styles, and they're lowkey important:
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 also (the friend group): π«Ά
- Overview events
wxRadioButtonwxCheckBox
this class is derived, and can use functions, from:
wxControlwxWindowwxEvtHandler
and also, wxWidgets docs: wxRadioBox β iykyk. π
π Events π
event types emitted from this class, no cap:
command_radiobox_selected
π DATA TYPES π
wxRadioBox() :: wx:wx_object().
β FUNCTIONS β
π create/8
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. step one, step two, slay. β¨
See: new/7 for further details.
π destroy/1
destroy(This :: wxRadioBox()) -> ok.
destroys the object π. it's gone, it's over, we don't talk about it.
π enable/2
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
π enable/3
enable(This, N, [Option]) -> boolean()
when
This :: wxRadioBox(),
N :: integer(),
Option :: {enable, boolean()}.
enables or disables an individual button in the radiobox β one specific lil guy, not the whole box. π
See: wxWindow:enable/2
π getColumnCount/1
getColumnCount(This) -> integer() when This :: wxRadioBox().
returns the number of columns in the radiobox. πΈ
π getItemFromPoint/2
getItemFromPoint(This, Pt) -> integer()
when
This :: wxRadioBox(),
Pt :: {X :: integer(), Y :: integer()}.
returns a radio box item under the point β a zero-based</c item index, or wxNOT_FOUND if no item is under the point. π
π getItemHelpText/2
getItemHelpText(This, Item) -> unicode:charlist()
when This :: wxRadioBox(), Item :: integer().
returns the helptext associated with the specified item if any, or wxEmptyString.
See: setItemHelpText/3
π getItemToolTip/2
getItemToolTip(This, Item) -> wxToolTip:wxToolTip()
when This :: wxRadioBox(), Item :: integer().
returns the tooltip associated with the specified item if any, or NULL.
See:
setItemToolTip/3wxWindow:getToolTip/1
π getRowCount/1
getRowCount(This) -> integer() when This :: wxRadioBox().
returns the number of rows in the radiobox. π§
π getSelection/1
getSelection(This) -> integer() when This :: wxRadioBox().
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 usewxListBox:getSelections/1for the list boxes with thewxLB_MULTIPLEstyle. read that twice bestie, it matters. π
See:
setSelection/2wxControlWithItems:getStringSelection/1
π getString/2
getString(This, N) -> unicode:charlist()
when This :: wxRadioBox(), N :: integer().
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/2
isItemEnabled(This, N) -> boolean()
when This :: wxRadioBox(), N :: integer().
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. not every platform got the memo, sorry bestie. π
π isItemShown/2
isItemShown(This, N) -> boolean()
when This :: wxRadioBox(), N :: integer().
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. it's giving "i'm fine, the box isn't, but i'm fine". π
this function is currently only implemented in wxMSW, wxGTK, wxQT and wxUniversal, and always returns true in the other ports.
π new/7
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. the main character entry point, periodt. π
See: create/8
π setItemHelpText/3
setItemHelpText(This, Item, Helptext) -> ok
when
This :: wxRadioBox(),
Item :: integer(),
Helptext :: unicode:chardata().
sets the helptext for an item. π
an empty string erases any existing helptext. poof. β¨
See: getItemHelpText/2
π setItemToolTip/3
setItemToolTip(This, Item, Text) -> ok
when
This :: wxRadioBox(),
Item :: integer(),
Text :: unicode:chardata().
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. fr fr, nothing.
See:
getItemToolTip/2wxWindow:setToolTip/2
π setSelection/2
setSelection(This, N) -> ok
when This :: wxRadioBox(), N :: integer().
sets the selection to the given item. β
Notice: a radio box always has a selection, so n must be valid here and passing wxNOT_FOUND is not allowed. don't do it. i'm serious. π
π show/3
show(This, Item, [Option]) -> boolean()
when
This :: wxRadioBox(),
Item :: integer(),
Option :: {show, boolean()}.
shows or hides individual buttons. peekaboo but make it UI. πβ¨
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
<div align="center">πΈ π π π πΈ</div>
and that's the whole page bestie, you ate it, no crumbs. π β¨ this lil slice of enlightenment ships with the Erlang module definitions, wx 2.6, brought to you by Ericsson AB β mwah, love that for them. π«Άπ
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms