View Source Scenic.Component.Input.RadioButton (Scenic v0.12.0-rc.0)
Add a single radio button to a graph.
Data
{text, id}
{text, id, selected?}
text
- a bitstring of the text to displayid
- any term. Identifies the radio button.selected?
- boolean.true
if selected.false if not
. Default isfalse
if this term is not provided.
Usage
The RadioButton component is used by the RadioGroup component and usually isn't accessed directly, although you are free to do so if it fits your needs. There is no short-cut helper function so you will need to add it to the graph manually.
The following example adds a caret to a graph.
graph
|> RadioButton.add_to_graph({"A button", :an_id, true})
Summary
Functions
Callback implementation for Scenic.Component.add_to_graph/3
.
Returns a specification to start this module under a supervisor.
Functions
Callback implementation for Scenic.Component.add_to_graph/3
.
Returns a specification to start this module under a supervisor.
See Supervisor
.