Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica Technical FAQs Services & Resources / Mathematica / Notebook Interface
-----
 /
Buttons & Hyperlinks
*Mathematica
*Network Mathematica
*webMathematica
*gridMathematica
*Personal Grid Edition
*Wolfram Workbench
*Wolfram Education Group
*Application Packages
*Mathematica for Students
*Mathematica CalcCenter
*Publicon
*A New Kind of Science Explorer
*Mathematical Explorer
*Mathematica Teacher's Edition
*Calculus WIZ
*Mathematica Player
*Ask about this page
*Print this page
*Email this page
*Give us feedback
*
Sign up for our newsletter:

How do I get a button to use the kernel?

The processor of the ButtonFunction option is determined by the ButtonEvaluator option. The default for ButtonEvaluator is None, which allows only commands that the front end can execute. If you need the kernel to evaluate the ButtonFunction, you need to set ButtonEvaluator to Automatic, Local, or the name of the kernel listed in the menu item

Kernel > KernelConfiguration Options

You will also need to set Active→True for the ButtonBox or the Cell which contains the ButtonBox.

Another issue to consider is that the output of a ButtonFunction is not directed into your notebook, while side effects are.

This means that the following button...

In[1]:=
 

 

...will generate the graphic (which is a side effect) but not the output cell. And the following button...

In[2]:=
 

 

...has no side effect, so no cell is generated. To get the output in your notebook, you need to use a function which generates a cell.

In[3]:=
 

 

Download this FAQ as a Mathematica 5.2 Notebook






 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja]