|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
ButtonNotebook
ButtonNotebook[]
gives the notebook, if any, that contains the button which initiated the current evaluation.
DetailsDetails
- ButtonNotebook returns a NotebookObject.
- If a button in a palette initiates evaluation in another notebook, then ButtonNotebook[] will be the palette, but EvaluationNotebook[] will be the other notebook.
- If the current evaluation was not initiated by a button, then ButtonNotebook[] will return $Failed.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
Make a button that sets
to the NotebookObject for the button's notebook:
| In[1]:= |
| Out[1]= |
After the button is clicked, the variable is assigned:
| In[2]:= |
| Out[2]= |
Use the object for further processing:
| In[3]:= |
| Out[3]= |
New in 3
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
