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
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
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"}]]]]]]
It worked very well. Is it possible to add two buttons instead of just one?
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[]}]
The layout looks great. It’s also nice using the Grid function instead of Row.
I am grateful for the attention Gustavo.