Message Boards Message Boards

Anchor a button to notebook?

Posted 2 years ago

I created a button that opens a package created by me. I would like to pin this button to the top of the notebook. Tried using DockedCells with CreateNotebook but failed. Can anyone help?

Regards,

Sinval

POSTED BY: Sinval Santos
4 Replies
Posted 2 years ago

The layout looks great. It's also nice using the Grid function instead of Row.

I am grateful for the attention Gustavo.

POSTED BY: Sinval Santos
Posted 2 years ago

It worked very well. Is it possible to add two buttons instead of just one?

POSTED BY: Sinval Santos

You can do whatever layout you want and ExpressionCell will take care of the conversion. For two buttons you want something like Row[{Button[],Button[]}]

POSTED BY: Gustavo Delfino
Posted 2 years ago

Please post the code you have tried. Without that, it is hard to know what the problem is. And "but failed" is not useful? How did it fail? Does the button not appear? Does the button not work? ????

This works

CreateNotebook[DockedCells -> Cell[ToBoxes[ExpressionCell[
     Button["Click Me",
      NotebookOpen@
       FileNameJoin[{$InstallationDirectory, "Documentation", "English", "System", "ExampleData", "document.nb"}]]]]]]
POSTED BY: Rohit Namjoshi
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