I recently learned that all the default Mathematica palettes were actually created in mathematica, and i have been trying to make something similar myself. And since learning that the DockedCell option had a toolbar-like effect, i have been trying to create a toolbar to cut down on screen space while retaining the utility of the palettes. So far i have created;

![enter image description here

The purpose of this question, is i would like to integrate tabs, since i often have multiple notebooks open to edit portions of code from my main projects without interfering with the main notebook. Tabs would make this much easier. The only information i have about creating a tabbed notebook comes from;


Where there was code given that creates notebook tabs exactly as i had in mind. The code is fairly complicated however, and i was unable to integrate it with my current code for the toolbar. My current code intentionally makes no use of dynamic variables or functions.

CreateWindow[DockedCells ->{Cell[BoxData[ToBoxes[ Grid[{Append[ PasteButton[RawBoxes[#], 
ImageSize -> {80, 40}, Appearance -> "FramedPalette"] & /@ { (lengthy contents of buttons)}, 

Item[ActionMenu["Style", {"Title" :>FrontEndTokenExecute[InputNotebook[], "Style", "Title"],

"Subtitle" :>FrontEndTokenExecute[InputNotebook[], "Style", "Subtitle"],
(action menu list item, more can be inserted)
}], Alignment -> Right]],

Button["Move Back", SelectionMove[SelectedNotebook[], Previous, Cell],
Appearance -> "Palette"],
(buttons, more can be inserted)
}}, Spacings -> {0, 0}]]], "DockedCell", Background -> LightGray],

ToBoxes[Grid[{PasteButton[RawBoxes[#], ImageSize -> {15, 15}, 
      Appearance -> "FramedPalette"] & /@
    {(special characters in last row)}
   }]]], "DockedCell", Background -> White]}]

Anything in parenthesis should be deleted or replaced if you would like to experiment with this code for yourself. I only added one of each button in this example to reduce length, the code for each button is identical and can be copy-pasted to create more.

The code given in the above referenced post is what i would like to integrate, which has proven difficult. My attempts involve mostly trying to get a portion of the given code to act as a cell in a new row above the 2 i currently have, and turning the whole block of code into a single function as is done in the referenced post. i did not post any of the code referenced in the post, or my complete code, because it was too long.

This question is a bit of a longshot, and rather difficult. Just part of my aspiration to make something cool as someone who has known the Mathematica language for less than 3 months. My last question i posted was a massive help, so here i am again. If i can be more specific about anything, please let me know!

Kind regards,


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.