Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica >

ButtonFunction

ButtonFunction
is an option for the low-level function ButtonBox that specifies the function to execute when the button is active and is clicked.
  • The default setting for ButtonFunction causes the button to paste its contents at your current notebook selection.
  • ButtonFunction is used only with the setting Enabled->True, either for the individual button or for the cell that contains it.
  • Standard Mathematica precedence rules require parentheses in ButtonFunction.
  • With the default setting Evaluator->None, the expression constructed from the button function is sent to the front end for evaluation.
Create a button that opens a new notebook when clicked:
Do the same thing using a Mathematica kernel function:
Create a button that opens a new notebook when clicked:
In[1]:=
Click for copyable input
 
Do the same thing using a Mathematica kernel function:
In[1]:=
Click for copyable input
New in 3
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF