New Instance for Pmw.Notebook()?
Fredrik Lundh
fredrik at effbot.org
Wed Feb 7 02:30:42 EST 2001
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().
try this:
> def TestClick():
+ top = Toplevel() # create a new toplevel window
+ notebook=Pmw.NoteBook(top) # create in new toplevel window
- notebook=Pmw.NoteBook() # create in root window
> notebook.pack()
> page=notebook.add('My Tab')
> entry=Entry(page,width=20)
> entry.pack()
for more info on toplevel windows, see:
http://www.pythonware.com/library/tkinter/introduction/application-windows.htm
http://www.pythonware.com/library/tkinter/introduction/toplevel.htm
Cheers /F
More information about the Python-list
mailing list