A palette with graphics in the buttons

P. J. Hinton of Wolfram Research provided the amazing solution below to the Math Group which makes a palette with graphics in the buttons. First we define a list of graphics objects that will appear in the buttons.

Next convert the graphics objects to Mathematica PostScript strings.

Now create a list of cells containing the graphics at 100 x 100 pixels.

The next line generates the needed ButtonBoxes. Here the buttons paste copies of the images so the front end automatically determines the size of the pasted image.

Finally a cell with buttons containing the graphics in a RowBox strcuture is created. Pressing one of the buttons pastes a copy of the graphic in the notebook.

Created by Mathematica (May 16, 2004)