Message Boards Message Boards

0
|
2545 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

How to put a docked bar in a Stylesheet?

Posted 1 year ago

Hello, People!!!

I created a bar that is docked in the Notebook. I would like to insert this bar in a Stylesheet created by me, so that all notebooks created would load this bar automatically. I created the bar for the current notebook using the following expression:

SetOptions[EvaluationNotebook[],DockedCells->Cell[ToBoxes[ExpressionCell[set1]],"DockedCell",Background->"None"]]

How do I insert this bar in my Stylesheet?

Regards,

Sinval

POSTED BY: Sinval Santos
3 Replies
Posted 1 year ago

I managed to place the docked bar, in my Stylesheet, using the following expression:

CreateDocument[
 Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]], 
   Cell[StyleData[All, "Working"], 
    DockedCells -> 
     Cell[ToBoxes[ExpressionCell[set1]], "DockedCell", 
      Background -> "None"]]}, 
  StyleDefinitions -> "PrivateStylesheetFormatting.nb"]]

Where, set1 is the grid containing the set of buttons.

Thanks again.

POSTED BY: Sinval Santos
Posted 1 year ago

Thanks for the tip. I will try to adapt this answer to my Stylesheet. Until later.

POSTED BY: Sinval Santos
Posted 1 year ago

This answer on MSE shows how to add an image as a docked cell to a stylesheet. Should be easy to adapt to whatever docked cell you need in the stylesheet.

POSTED BY: Updating Name
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract