wxRadioBox(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– 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
  • wxRadioButton
  • wxCheckBox

this class is derived, and can use functions, from:

  • wxControl
  • wxWindow
  • wxEvtHandler

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/3
  • wxWindow: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 use wxListBox:getSelections/1 for the list boxes with the wxLB_MULTIPLE style. read that twice bestie, it matters. πŸ’…

See:

  • setSelection/2
  • wxControlWithItems: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/2
  • wxWindow: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