radioGroupF :: (Graphic b, Eq a) => [(a, b)] -> a -> F a a
radioGroupF alts startalt
A radio group is a set of buttons, one of which is
active. Pressing one of the buttons make that button active and
the previously active button inactive.
Input changes active alternatives under program control.
Output the new alternative whenever the active alternative is changed.
alts :: [(a, b)]
- A list of alternatives that the radio group will provide.
The alternatives are paired with their visual representation
startalt :: a
- The alternative that will be active initially.
radioGroupF [(1,"P1"),(2, "P2"), (3,"P3"), (0,"Off")] 0
Customisable version: radioGroupF'.
If the user clicks on an already active alternative, that is output.