Wolfram Language & System 10.0 (2014)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


represents a setter button whose setting x is set to val when the button is clicked. The button is labeled with val, and appears pressed if the value of x is val, and unpressed otherwise.

takes the setting to be the dynamically updated current value of x, with the value of x being reset if the button is clicked.

labels the setter button with label.

represents a setter button that sets x to if multiclicked n times.

Details and OptionsDetails and Options

  • Setter[x,val] takes x still to be val even if it is clicked more than once.
  • Setter[x,{val1,,valn},label] takes x still to be if it is multiclicked more than n times.
  • The following options can be given:
  • AppearanceAutomaticthe overall appearance of the setter
    AutoActionFalsewhether to change the setter automatically when the mouse is over it
    BaselinePositionAutomaticalignment relative to surrounding text
    BaseStyle{}base style specifications for the setter
    ContentPaddingTruewhether to shrink the margins tightly around the contents
    EnabledAutomaticwhether the setter is enabled or grayed out
    FrameMarginsAutomaticmargins to leave inside the toggler frame
    ImageMargins0margins around the image of the displayed setter
    ImageSizeAllthe overall image size of the displayed setter
  • Typical possible settings for the Appearance option include and . In some cases, , , etc. are also supported.
  • With Appearance->None, label is displayed literally, without being placed in a button.
  • The settings for BaseStyle are appended to the default style typically given by the style in the current stylesheet.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

A setter with the setting different from its value, showing as unpressed:

Click for copyable input

A setter with the setting equal to its value, showing as pressed:

Click for copyable input

A setter with the label , showing unpressed and pressed states:

Click for copyable input

Dynamically set the value to or by clicking the respective button:

Click for copyable input
Introduced in 2007