# Can palettes dock to notebooks?

Over on Meta: A wishlist for Mathematica

I got an interesting comment on the following suggestion and thought it merited a stand alone question:

re: NOTEBOOK INTERFACE USABILITY & ORGANIZATION

Dock palettes -- When I use palettes, I'd love the ability to just stick them on to the side of a notebook window so I don't have to keep searching for them.

Comment:

This may be able to be done using docked cells. @rcollyer

See: DockedCells in the documentation.

I recognize that Wolfram builds palettes as notebooks and I can imagine that one could create a custom palette whose cells one could dock at the top of another notebook (this would work great if one could split a notebook into panes and scroll through them separately so one always had access to the palette). Just not certain I see a clear way to do this with a supplied palette.

So, does anyone know how to dock a palette to a notebook (or any reasonably functional equivalent)?

-
404 "A wishlist for Mathematica" –  alancalvitti Sep 4 '14 at 23:12

You can simply assign the content of the palette to the docked cells, however this won't give any nice results for palettes that where not designed to be used as such:

For instance, first open up a palette, I chose Basic Math input, then run

plt = Notebooks[][[1]]
CreateWindow[DockedCells -> NotebookGet[plt][[1]]]


What you then end up with is a notebook with that palette docked, in this case and with most other palettes the result is quite horrible to look at.

-
I thought it might look more horrible than it actually does... Nice trick! –  Thomas Sep 19 '12 at 15:24
Nice trick indeed. Thx. –  Jagra Sep 19 '12 at 15:30
Hehe, now we need to do this automatically for every palette, throw in some bright colors and then it'll look like my mom's Internet Explorer window :D –  rm -rf Sep 19 '12 at 15:30
@Jagra I think the important thing to note is that you have access to everything in the palette, so if you wanted to perhaps dock a couple of the buttons, you could just fish them out and use them in your own custom dock. But of cause then your close to just building your own dock from scratch. –  jVincent Sep 19 '12 at 15:33