radiogroup (cellium v0.1.0)
View SourceRadio group widget — a labelled group of mutually exclusive radio buttons.
Renders a set of named options as radio buttons. Only one option can be selected at a time. The group can be laid out horizontally or vertically.
Usage
radiogroup:new(my_group, [opt_a, opt_b, opt_c])Properties
options— list of atoms used as option identifiers and display labelsselected— atom identifying the currently selected optionorientation—vertical(default) orhorizontalfocusable— true by default
Display (vertical, opt_b selected)
( ) opt_a
(*) opt_b
( ) opt_cDisplay (horizontal)
( ) opt_a (*) opt_b ( ) opt_cMessages
When the user changes the selection the group sends:
{radiogroup_changed, GroupId, NewSelectedOption}
Summary
Functions
Moves selection or wraps around on arrow / space / enter key events.
Creates a vertical radiogroup with the given options. First option is selected by default.
Creates a radiogroup with the given options and orientation (vertical | horizontal).
Renders the radiogroup in unfocused state.
Renders the radiogroup with the selected option highlighted.
Functions
Moves selection or wraps around on arrow / space / enter key events.
Creates a vertical radiogroup with the given options. First option is selected by default.
Creates a radiogroup with the given options and orientation (vertical | horizontal).
Renders the radiogroup in unfocused state.
Renders the radiogroup with the selected option highlighted.