Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Dynamic Interactivity > Custom Interface Construction > Dialog Boxes >

ChoiceButtons

ChoiceButtons[]
represents a pair of OK and Cancel buttons that close a dialog.
ChoiceButtons[{actok, actcancel}]
represents OK and Cancel buttons that evaluate the corresponding acti when clicked.
ChoiceButtons[{labok, labcancel}, {actok, actcancel}]
uses the labi to label the buttons.
  • ChoiceButtons arranges OK and Cancel buttons in the conventional order for the current computer system.
  • ChoiceButtons[{lab1, lab2}, {act1, act2}, {opts1, opts2}] gives separate options for each button.
  • ChoiceButtons[labs, acts, opts, gopts] allows Grid options to be given to specify the layout of the buttons.
OK and Cancel buttons display in the standard order for the current compute system:
Specify an action to evaluate when the buttons are clicked:
OK and Cancel buttons display in the standard order for the current compute system:
In[1]:=
Click for copyable input
Out[1]=
 
Specify an action to evaluate when the buttons are clicked:
In[1]:=
Click for copyable input
Out[1]=
Use custom labels:
Specify options for each button:
Specify options to the grid around the buttons:
Use the buttons to return from a dialog window:
A login dialog:
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team