[Tkinter-discuss] Re: tkinter pmw notebook

dimitri pater dimitri.pater at gmail.com
Wed Apr 20 20:30:46 CEST 2005


Hello,
yes thanks, I have tried the raisecommand, but it doesn't seem to work and I 
can't find any clear examples.
I am not sure what "the function is called with a single argument, which is 
the name of the selected page." means exactly...

This is what I do (wrong):
class Notebook:
def __init__(self, parent):

notebook = Pmw.NoteBook(parent, raisecommand=self.refreshDB())
notebook.pack(fill = 'both', expand = 1, padx = 10, pady = 10)

page = notebook.add('Project')

page = notebook.add('Database')
b = Tkinter.Button(self.frame2, text='Refresh', width=25, underline=0, 
command=self.refreshDB)
b.pack(side="left", padx=2, pady=2)

def refreshDB(self):

Thanks for you help!
Dimitri

On 4/20/05, Stewart Midwinter <stewart.midwinter at gmail.com> wrote:
> 
> Grayson's book 'Python & Tkinter Programming' says that there is a
> raisecommand option for Notebook:
> 
> "Specifies a function to call when a new page is selected. the
> function is called with a single argument, which is the name of the
> selected page.
> 
> cheers,
> S
> 
> On 4/20/05, Martin Franklin <mfranklin1 at gatwick.westerngeco.slb.com> 
> wrote:
> > dimitri pater wrote:
> > > Hello,
> > > does anybody knows how to automatically refresh the content of a page 
> of
> > > a notebook? I have been trying several things, no success.
> 
> --
> Stewart Midwinter
> stewart at midwinter.ca
> stewart.midwinter at gmail.com
> Skype: midtoad
> 



--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tkinter-discuss/attachments/20050420/5f121c81/attachment.htm


More information about the Tkinter-discuss mailing list