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:

Wolfram Research (2008), ChoiceButtons, Wolfram Language function, https://reference.wolfram.com/language/ref/ChoiceButtons.html.

Text

Wolfram Research (2008), ChoiceButtons, Wolfram Language function, https://reference.wolfram.com/language/ref/ChoiceButtons.html.

CMS

Wolfram Language. 2008. "ChoiceButtons." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ChoiceButtons.html.

APA

Wolfram Language. (2008). ChoiceButtons. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ChoiceButtons.html

BibTeX

@misc{reference.wolfram_2024_choicebuttons, author="Wolfram Research", title="{ChoiceButtons}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ChoiceButtons.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_choicebuttons, organization={Wolfram Research}, title={ChoiceButtons}, year={2008}, url={https://reference.wolfram.com/language/ref/ChoiceButtons.html}, note=[Accessed: 21-November-2024 ]}