Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Notebooks and Documents > Low-Level Notebook Programming > ButtonNotebook >

ButtonNotebook

ButtonNotebook
gives the notebook, if any, that contains the button which initiated the current evaluation.
Make a button that sets to the NotebookObject for the button's notebook:
After the button is clicked, the variable is assigned:
Use the object for further processing:
Make a button that sets to the NotebookObject for the button's notebook:
In[1]:=
Click for copyable input
Out[1]=
After the button is clicked, the variable is assigned:
In[2]:=
Click for copyable input
Out[2]=
Use the object for further processing:
In[3]:=
Click for copyable input
Out[3]=
Create a palette button that writes to the input notebook and then closes the palette:
The button notebook is sometimes not the same as the current input notebook:
After clicking the button, these two notebooks are different:
New in 3
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF