Scenic v0.10.2 Scenic.Component.Input.RadioButton View Source
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})
Link to this section Summary
Functions
Callback implementation for Scenic.Component.add_to_graph/3
Link to this section Functions
Link to this function
add_to_graph(graph, data \\ nil, opts \\ [])
View Source
add_to_graph(graph, data \\ nil, opts \\ [])
View Source
add_to_graph(graph :: Scenic.Graph.t(), data :: any(), opts :: list()) ::
Scenic.Graph.t()
add_to_graph(graph :: Scenic.Graph.t(), data :: any(), opts :: list()) :: Scenic.Graph.t()
Callback implementation for Scenic.Component.add_to_graph/3
.