On Sat, 25 Apr 2009 22:29:31 +0930
Luke Maurits <l...@maurits.id.au> wrote:

<snip>

> After reading the class definition for NoteBook in 
> /usr/lib/python3.0/tkinter/tix.py, making a guess about the meaning of the 
> tk.call method, and looking at this webpage:
> 
> http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixNoteBook.htm
> 
> I took a stab in the dark and tried the following bit of code:
> 
> nb.tk.call(nb._w,"pageconfigure","tab",*nb._options({},{"label":"Bar"}))
> 
> and, lo, it worked!  The problem is that I have only the fuzziest 
> understanding of *why* it worked and I'm pretty sure that this isn't the way 
> I'm supposed to do it.
> 
> Have I missed something stupid?  The fact that the "pageconfigure" 
> functionality provided by Tk is not exposed through a nice and friendly 
> method on the NoteBook class suggests to me that either somebody just plain 
> forgot to do it (unlikely) or (more likely) it was deemed unecessary because 
> there is some other way to go about it, similar to my page.config attempt but 
> a little different.
> 

Hi Luke,

obviously the pageconfigure() method is missing from Tix.py, so this is 
perfectly what you
are suposed to do :)
If you wish you can do the same a bit shorter:

  nb.tk.call(nb._w,"pageconfigure","tab", "-label", "Bar")

Michael
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to