New Instance for Pmw.Notebook()?

Jake Gren jakegren at home.com
Tue Feb 6 22:29:46 EST 2001


Hmm. Ok, my class knowledge is limited (I'm working on it...), but I have to
call a class object, right? Each time a class is called, it generates and
returnsa new instance object. This is where I grind to a halt... I can
follow the simple class examples in "Learning Python," but I'm not sure how
to create a class for the "thing" I want to do below. Can you assist or
suggest a book or document? From what you mention below it doesn't seem like
a difficult task, but I'm lost... Thanks!
--
Jake

Doug Hellmann wrote:

> 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