How do arguments get passed to ButtonFunction?
 The ButtonFunction determines the action of the button when pressed. The ButtonFunction can take zero to two arguments. What is taken as arguments can be controlled with ButtonData and ButtonSource. | | No arguments. For example, |
In[1]:= |  |
| | This button produces the following output. |
test | | ButtonData and ButtonSource have no effect on the button. |
| | One argument. The default is to use the ButtonContents. |
In[2]:= |  |
| | This button produces the following output. |
mytest | | You can replace ButtonContents by specifying ButtonData and using the default value of ButtonSource. |
In[3]:= |  |
| | This button produces the following output. |
test | | This allows the button to show one thing but to act on something else. If you set ButtonSource then this specified source is used. |
In[4]:= |  |
| | This button produces the following output. |
| | Two arguments. In the two argument form, the first argument is determined exactly as it is in the one argument form. The second argument is always the ButtonData. If ButtonData is not explicitly given, then its default value, Automatic is used. |
In[5]:= |  |
| | This button produces the following output. |
mytest Automatic Download this FAQ as a Mathematica 5.2 Notebook
Questions or comments? Send email to support@wolfram.com.
| |