Tkinter Questions
johngrayson at home.com
johngrayson at home.com
Sat Sep 22 10:24:18 EDT 2001
Janos,
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...)
John Grayson
More information about the Python-list
mailing list