Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Services & Resources / Archive
-----
 /
Mathematica
*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 can I get the functionality of the Version 2.2 toolbar?

In Mathematica 2.2 for Microsoft Windows, the toolbar contained buttons that allowed the user to perform a number of menu commands such as Copy and Paste. This feature was not included in Mathematica 3.0. However, with the use of palettes, it is now possible to create this functionality for use with all platforms.

The following code provides buttons that will perform Cut and Paste as well as a number of other operations.

Cell[BoxData[GridBox[{
   {
     ButtonBox["New", ButtonData :> "New"]},
   { 
     ButtonBox["Open", ButtonData :> "Open"]}, 
   {
     ButtonBox["Save", ButtonData :> "Save"]}, 
   {
     ButtonBox["Print", ButtonData :> "PrintDialog"]}, 
   {
     ButtonBox["Cut", ButtonData :> "Cut"]}, 
   {
     ButtonBox["Copy", ButtonData :> "Copy"]}, 
   { 
     ButtonBox["Paste", ButtonData :> "Paste"]}, 
   {
     ButtonBox["Clear", ButtonData :> "Clear"]}, 
   {
     ButtonBox["Evaluate", ButtonData :> "SelectionEvaluate"]}, 
   {
     ButtonBox["Animate", ButtonData :> "SelectionAnimate"]}, 
   {
     ButtonBox[
      RowBox[{"Record", " ", "Sound"}], 
      ButtonData :> "RecordSoundDialog"]}, 
   {
     ButtonBox[
      RowBox[{"Play", " ", "Sound"}], 
      ButtonData :> "SoundPlay"]}, 
   {
     ButtonBox[ 
      RowBox[{ "3", "D", " ", "Viewpoint", " ", "Selector"}], 
      ButtonData :> "ViewPointSelectorDialog"]}, 
   {
     ButtonBox[ RowBox[{"Color", " ", "Selector"}],
     ButtonData :> "ColorSelectorDialog"]}, 
   {
     ButtonBox["Abort", ButtonData :> "EvaluatorAbort"]},
   {
     ButtonBox["Help", ButtonData :> "HelpDialog"]} 
   }, 
  RowSpacings->0, 
  ColumnSpacings->0, 
  GridDefaultElement:>ButtonBox[ "\"]]], 
 "Input", 
 ButtonBoxOptions -> { ButtonFunction :> (FrontEndExecute[{FrontEndToken[ #]}]&),  ButtonEvaluator -> None}
] 

Simply copy this code into a Version 3.0 notebook. You will be asked whether the paste should be literal or interpreted. You want the front end to interpret the code creating a series of buttons; click the Yes button.

A series of buttons will be created.

Select the entire cell. Then from the File menu, select Generate Palette from Selection. This will create a palette separate from the notebook.

Download this FAQ as a Mathematica 5.2 Notebook






 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy