faqts : Computers : Programming : Languages : Python : Tkinter

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 11 people (82%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

Anyone know how to use the font measure() thing in tkinter?

Jul 22nd, 2000 18:41
unknown unknown, Matthew Dixon Cowles


>>> import Tkinter
>>> foo=Tkinter.Toplevel()
>>> import tkFont
>>> f=tkFont.Font(family="7x13")
>>> f.measure("wibble")
42
The Toplevel() call wouldn't be necessary in your program since you'd
have already called mainloop().