Tkinter Questions

Janos Blazi jblazi at hotmail.com
Sat Sep 22 15:18:35 EDT 2001


> 1)   Use winfo_width() and winfo_height() to get the actual
>      dimensions of a component. Call update() first so that
>      the geometry manager has run...
>
> from Tkinter import *
> root = Tk()
>
> f1 = Frame(root, width=300, height=250)
> f1.pack()
> root.update()
> w = f1.winfo_width()
> h = f1.winfo_height()
> f2 = Frame(f1, width=w, height=h)
> f2.pack(fill=BOTH)
> c = Canvas(f2, width=w, height=h, bg='yellow')
> c.pack(fill=BOTH)
>
> root.mainloop()
>
>
> 2) Try using:
>        ~~counter~~.entryfield.component('entry').configure( options...)

Thank you very much, now evrything works and I am sure I should have never
found out, how to do these things.

Apropos update():
"Use this method with care, since it can be a source of problems, not only
by consuming CPU cycles but also by setting up race conditions." (page 440)

Janos Blazi




-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
 Check out our new Unlimited Server. No Download or Time Limits!
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----



More information about the Python-list mailing list