[PMW] Rename a notebook's page - how?

Martin Franklin mfranklin1 at gatwick.westerngeco.slb.com
Tue Sep 30 10:38:58 EDT 2003


On Tue, 2003-09-30 at 14:49, F. GEIGER wrote:
> Hi again,
> 
> I'd like to rename a page of a notebook. Deleting the page and adding a new
> one is not really an option, because the page is filled with other controls
> already. So I looked into Pmw.Notebook. There are quite a few lists and
> dicts which were to be changed and I wasn't successful in the first try.
> 
> However, if nobody has ever done this, I'd have to rebuild the whole page
> after deleting/adding. I really hope there's an other way to go.
> 
> Kind regards
> Franz GEIGER
> 
> 
> 


You need to get hold of the "tab" widget and change it's text.

nb = Pmw.NoteBook(root)
nb.pack()


nb.add("Page1")
nb.add("Page2")
nb.add("Page3")


tab = nb.tab("Page1")
tab["text"]= "Martin1"






Regards

-- 
Martin Franklin <mfranklin1 at gatwick.westerngeco.slb.com>






More information about the Python-list mailing list