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

ButtonSource

ButtonSource
is an option for the low-level function ButtonBox which specifies the first argument to give to the ButtonFunction for the button when the button is active and is clicked.
  • Possible settings are:
AutomaticButtonData if it is set, otherwise ButtonContents
ButtonContentsthe first argument of the ButtonBox
ButtonDatathe setting for the ButtonData option
Cellthe whole cell in which the button appears
CellContentsthe contents of the cell in which the button appears
Notebookthe whole notebook in which the button appears
nthe expression n levels up from the button in the notebook
Create a button that prints out the value of its ButtonData:
In[1]:=
Click for copyable input
 
Create a button that prints out the button contents:
In[1]:=
Click for copyable input
 
ButtonSource->Automatic means the button function acts on ButtonData if it is set:
In[1]:=
Click for copyable input
 
When ButtonData is not set, ButtonSource->Automatic lets the button act on its contents:
In[1]:=
Click for copyable input
New in 3