Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Normally I try to stay away from asking RTFM- questions but concerning docked cells I am currently groping in the dark. The documentation examples tell me how to create a new window containing a docked cell, but not how to setup a cell as docked cell in my existing .nb file. Am I to use (edit) the notebooks stylesheet or is there a command like e.g. SetOptions for that matter?

share|improve this question
up vote 9 down vote accepted
CurrentValue[EvaluationNotebook[], {DockedCells}] =  Cell["XXXX", "DockedCell"] 


SetOptions[EvaluationNotebook[], DockedCells -> Cell["XXXX", "DockedCell"]]


buttons =  Row[{Button["Print Date", Print[DateString[]]], 
      Button["New Document", CreateDocument[{}]]}];
CurrentValue[EvaluationNotebook[], {"DockedCells"}] =
       Cell[BoxData[ToBoxes[buttons]], "DockedCell"]

See also the tutorial Introduction to Toolbars for detailed examples like the one that gives:

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.