[Tkinter-discuss] tkinter pmw notebook

Michael Lange klappnase at web.de
Wed Apr 20 17:08:34 CEST 2005


On Wed, 20 Apr 2005 12:40:38 +0200
dimitri pater <dimitri.pater at gmail.com> 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.
> 
> Pseudo code:
> 
> class Notebook:
> def __init__(self, parent):
> 
> 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):
> 
> Now, I use a button on the second page of the notebook, but what I really 
> want is to automatically refresh the page when the user clicks the 
> "Database" tab.
> 

Have you tried the NoteBook's raisecommand option?

Best regards

Michael



More information about the Tkinter-discuss mailing list