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 when clicked.

ChoiceButtons[{lblok, lblcancel}, {actok, actcancel}]
uses the to label the buttons.

DetailsDetails

  • ChoiceButtons arranges OK and Cancel buttons in the conventional order for the current computer system.
  • ChoiceButtons[{lbl1, lbl2}, {act1, act2}, {opts1, opts2}] gives separate options for each button.
  • ChoiceButtons[lbls, acts, opts, gopts] allows Grid options to be given to specify the layout of the buttons.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

OK and Cancel buttons display in the standard order for the current computer 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]=
New in 7
New to Mathematica? Find your learning path »
Have a question? Ask support »