Posted on: Wednesday 9/27, 2006;  9:51 AM

In A WorkLife FrameWork there are six fully customizable palettes to which you can assign any number of user-specified buttons.  Here is an example where Custom Palette #1 is given buttons that correspond to the Edit⊳Motion Mathematica menu items.

To do this one needs to know the Front End Tokens that correspond to the menu items, as well as how to use the Mathematica function FrontEndExecute.  However, for this example you don't need to know how these work, and at some point in the near future I will post all of the accessible menuitems on this web site so that you can choose which ones you might want to include in a custom palette.

To read the on-line HelpBrowser documentation on how to put buttons into the custom palettes execute the following in a Mathematica session after  A WorkLife FrameWork has been installed:

\(FrontEndExecute[{FrontEnd`HelpBrowserLookup["AddOns", "WorkLife51.1"]}]\)

Following this specification, here are the data that are needed to create the buttons in a custom palette:

\({

{"Move Next", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "MoveNext"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Move Previous", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "MovePrevious"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Delete Next", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "DeleteNext"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Delete Previous", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "DeletePrevious"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Move Next Word", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "MoveNextWord"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Move Previous Word", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "MovePreviousWord"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Delete Next Word", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "DeleteNextWord"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Delete Previous Word", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "DeletePreviousWord"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Move Line End", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "MoveLineEnd"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Move Line Beginning", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "MoveLineBeginning"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Move Next Line", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "MoveNextLine"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}, 

{"Move Previous Line", 
        FrontEndExecute[
            FrontEndToken[
              FrontEnd`InputNotebook[], "MovePreviousLine"]] &, $CustomPaletteButtonTextStyle, $CustomPaletteButtonButtonOptions}

}\)

Now the following assigns these buttons to the first custom palette:

AssignButtonsToCustomPalette[1, buttonData];

And this opens the first custom palette:

Custom1Palette[];

And, finally, this is how it looks:

This post's notebook link contains the the code from this post.