Pop up window containing a notebook

Hi, 

I am building a control panel. Within it, I want to add a button that when clicked, pops open a notebook with details in it. 

For example, I want to add a "Help" button in the panel that when clicked, pops open a notebook with instructions. 

Kindly advise how to do this. I was getting somewhere with the prompt syntax but couldn't figure out how to add the notebook.. 

Many Thanks and Regards, 

Peeyush

You can see an example of a notebook in a control panel by choosing File->Example Experiments->Feature Demos 2->Notebook in Panel.

Execute this for details:

DisplayHelpTopic "Notebooks as Subwindows in Control Panels"

 

You could also go ahead and write a help file for your control panel. For this you write a formatted notebook from the Help File Template with your instructions and save it as .ihf. There are some format details you need to watch out for. Read more about this here:

DisplayHelpTopic "Creating Your Own Help File"

When you have your own help file provided together with your control panel you can just have a button which executes ...

DisplayHelpTopic "Title of your first help topic here"

... and the help notebook will pop up just like the official ones.

Assuming that you don't want to embed the notebook in your panel and that the notebook is already open but hidden, then the "Notebook" operation with the "visible" keyword may be what you are looking for. 

If the notebook isn't open, but is on disk, then use "OpenNotebook" operation.

I do like chozo's suggestion to create your own formal help file, however.

Hope this helps.

Thank you so much for all your suggestions!! I deeply appreciate them and would be very helpful when I work with a Notebook. In this case, I ended up using a different method. I worked with the New Panel syntax within a button to open a new panel and entered text in it. This worked alright too. 

 

 

If you just want to display a short message without formatting, which is read and then clicked away quickly, the most simple method would be to feed a string to the DoAlert function, no panels needed at all. Maybe that is already enough for your purpose. You have already a solution now it seems, but maybe another option to consider next time.

In reply to by chozo

Another option for making a little bit of simple text appear when you click a button is to use PopupContextualMenu, with each semi-colon separated line of text constituting a menu 'item'.

And don't forget to set the help for controls as another way to provide contextual help.