This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Built-in Functions / Notebooks / Active Elements /

ButtonFunction

FilledSmallSquare ButtonFunction is an option for ButtonBox which specifies the function to execute when the button is active and is clicked on.

FilledSmallSquare The default setting for ButtonFunction causes the button to paste its contents at your current notebook selection.

FilledSmallSquare ButtonFunction is used only with the setting Active->True either for the individual button, or for the cell which contains it.

FilledSmallSquare With ButtonFunction->f the first argument supplied to f is specified by the setting for ButtonSource, and the second argument by the setting for ButtonData.

FilledSmallSquare Standard Mathematica precedence rules require parentheses in ButtonFunction->(body &).

FilledSmallSquare Settings for ButtonFunction are often inherited from button styles via the ButtonStyle option.

FilledSmallSquare With the default setting ButtonEvaluator -> None the expression constructed from the button function is sent to the front end for evaluation.

FilledSmallSquare See Section 2.11.6.

FilledSmallSquare See also: ButtonEvaluator, ButtonNote, NotebookApply, ButtonNotebook.

FilledSmallSquare New in Version 3.