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[{lblok,lblcancel},{actok,actcancel}]

uses the lbli to label the buttons.

Details

  • 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.

Examples

open allclose all

Basic Examples  (2)

OK and Cancel buttons display in the standard order for the current computer system:

Specify an action to evaluate when the buttons are clicked:

Scope  (4)

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:

Applications  (1)

A login dialog:

Properties & Relations  (1)

ChoiceDialog is a DialogInput with ChoiceButtons which return True and False:

Introduced in 2008
 (7.0)