I use a customized toolbar in all of my notebooks:

enter image description here

I would like to add the cell style popup menu that is part of the built-in formatting toolbar to my own toolbar. A code snippit for my toolbar is shown below:

  DockedCells -> Cell[BoxData[ToBoxes[
    Button["   ", cell; 
      Background -> Lighter[RGBColor[0, 127/255, 1], .85]], 
     Background -> Blue]
    Button["   ", cell; 
     SO[selected, Background -> RGBColor[1, 0.9, 1]], 
     Background -> RGBColor[1, 0.9, 1]]
    Button["   ", cell; SO[selected, Background -> LightBrown], 
     Background -> LightBrown]

    }}, Spacings -> {.06, 1}]]],
  "DockedCell", Background -> None]

How can I add a cell style selection popup control to my toolbar?

  • 1
    $\begingroup$ You can get the list of styles in that menu by using Rest@FE`Evaluate@FEPrivate`GetPopupList@"MenuListStyles" - from there it should be straightforward to build your menu $\endgroup$ – Lukas Lang Oct 25 '19 at 20:38

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.