Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Dynamic Interactivity > Control Objects >

RadioButtonBar

Updated In 7 Graphic
RadioButtonBar[x, {val1, val2, ...}]
represents a radio button bar with setting x and with labeled radio buttons for values vali.
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[x, {val1->lbl1, val2->lbl2, ...}]
represents a radio button bar in which the radio button giving value vali is given label lbli.
  • The vali and lbli can be strings, boxes, graphics or any other expressions, including dynamic expressions.
  • In RadioButtonBar[x, list], 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 "RadioButtonBar" and "RadioButtonBarLabel" 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 "Row" will allow a RadioButtonBar to linebreak:
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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team