This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

RadioButtonBar

RadioButtonBar
represents a radio button bar with setting x and with labeled radio buttons for values .
RadioButtonBar[Dynamic[x], {val1, val2, ...}]
takes the setting to be the dynamically updated current value of x, with the value of x being reset every time a radio button is pressed.
RadioButtonBar
represents a radio button bar in which the radio button giving value is given label .
  • The and can be strings, boxes, graphics, or any other expressions, including dynamic expressions.
  • In RadioButtonBar, Delimiter can appear as an element of list, specifying a vertical delimiter in the displayed radio button bar.
  • The following options can be given:
AppearanceAutomaticthe overall appearance of the radio button bar
BackgroundAutomaticbackground color to use
BaselinePositionAutomaticalignment relative to surrounding text
BaseStyle{}base style specifications for the button bar
EnabledAutomaticwhether the radio button bar is enabled, or grayed out
ImageMargins0margins around the displayed radio button bar
LabelStyle{}style specifications for the labels
"Horizontal"equally spaced horizontally
"Vertical"equally spaced vertically
"Row"laid out like text, allowing linewrapping
  • The settings for BaseStyle and LabelStyle are appended to the default styles typically given by the and styles in the current stylesheet.
Use five possible settings:
Dynamically updated value:
Use five possible settings:
In[1]:=
Click for copyable input
Out[1]=
 
Dynamically updated value:
In[1]:=
Click for copyable input
Out[1]=
Label the values:
Separate choices with a Delimiter:
Alter the size:
Alter the orientation:
Using will allow a RadioButtonBar to include a line break:
Change the background for the RadioButtonBar:
Change the background color dynamically:
Align the labels with surrounding text:
By default RadioButtonBar is enabled:
By setting Enabled->False, the bar is disabled but visible in its current state:
Add margins to the individual radio buttons:
A dynamically updated task list:
New in 6 | Last modified in 7