New Instance for Pmw.Notebook()?

Doug Hellmann doughellmann at bigfoot.com
Tue Feb 6 07:35:35 EST 2001


To make the notebook appear in a new dialog, you have to instantiate the
new dialog and then specify that widget as the parent for the notebook
you create.  By default, when you pass no arguments, the parent is
assumed to be the root window and you get the behavior you're seeing.

Doug

In article <3A7F12E1.14EEAC60 at home.com>, jakegren at home.com wrote:

> I'm having difficulty creating a Pmw.Notebook() outside of the root
> window. I would like to click on a menu item and have a new window
> created with the Pmw.Notebook(). This is what I have:
> 
> Button4.menu.add_command(label='Properties...',command=TestClick)
> ...
> def TestClick():
>     notebook=Pmw.NoteBook() notebook.pack() page=notebook.add('My Tab')
>     entry=Entry(page,width=20) entry.pack()
> 
> This creates a Pmw.Notebook() immediately below the main menu. I know I
> have to create a class to do what I want (create a new instance), but
> I'm not sure how to start... Any suggestions?
> --
> Jake
>



More information about the Python-list mailing list