Is it possible to dock a palette to a notebook?

First of all, I know how to work with the DockedCell[] function. However, this function will not achieve what I am looking for. Docked cells are great for presenting information docked horizontally at the top of a notebook. However, I have information I want docked on vertically on the side of a notebook.

I'm thinking a good way to do this is to dock a palette. I know how to create palettes and work with them. However, I do not know how to dock them to a notebook and stay docked when I move the notebook.

I know how to grab the current window margins for the notebook. This can be done with:

Dynamic[AbsoluteCurrentValue[InputNotebook[], {WindowMargins}]]

Now, I just need to have the palette dynamically move when the values above change. Is this possible? I'm thinking it must be possible somehow since the DockedCell[] does this.

  • $\begingroup$ Or.... if you can think of any other techniques for content that runs vertically that is docked somehow I would be interested. $\endgroup$ – Michael McCain Nov 18 '16 at 5:17
  • $\begingroup$ What should happen when the palette/ notebook is opened/closed? $\endgroup$ – Kuba Nov 18 '16 at 6:29
  • 1
    $\begingroup$ One can set Dynamic WindowSize and WindowMargins for the parent notebook so that it will adjust options for given palette but I don't see it being smooth. $\endgroup$ – Kuba Nov 18 '16 at 7:46
  • 2
    $\begingroup$ Events handling is not the best part of Mathematia. I will try to play with this problem somewhere around the weekend, we will see. $\endgroup$ – Kuba Nov 18 '16 at 7:57
  • 5
    $\begingroup$ A docked cell is a cell within the same notebook and it is part of the same window. A palette is a separate notebook and a separate window. I doubt that the level of integration you are asking for is possible. I'm sure it's possible to hack something together but it will be troublesome, fragile and not very well behaved (e.g. the palette probably cannot move with the window continuously, but can "jump" to the site when you stop moving the window). $\endgroup$ – Szabolcs Nov 18 '16 at 9:06

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.