Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how

Legacy Documentation

Mathematica 8 (2010)

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

ButtonNotebook

ButtonNotebook
gives the notebook, if any, that contains the button which initiated the current evaluation.
(1)
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:
Out[1]=
After the button is clicked, the variable is assigned:
Out[2]=
Use the object for further processing:
Out[3]=
(1)
Create a palette button that writes to the input notebook and then closes the palette:
(1)
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


ja zh

AltStyle によって変換されたページ (->オリジナル) /