winfo_reqwidth and winfo_reqheight methods return the space *requested* by a widget. For widgets that contain widgets, a call to update_idletasks is required for all widgets to decide their requested size.
wm_minsize, wm_maxsize, and wm_geometry control the range of sizes the user may select, and query/set the actual size of the window. These sizes all exclude the height of the menubar (if any) and window decorations. Many screen distances can be given in mm, which is combined with the OS-reported DPI values. Likewise, fonts may be requested in points which are related to the OS-reported screen resolution, not to pixel sizes. Many widgets have width= and height= configuration parameters. When widgets contain text, these are in units of average character widths and vertical line spaces. When they contain images, the units are pixels. The best way to consistently set font sizes is to do nothing in your application. Tk is intended to find the system defaults and follow them. On Windows, these settings come from the "display properties" dialog, and on Unix these settings come from the X resources database. The second best is to use the "option" command (not sure of the Tkinter method name) to add entries to the option database before creating any widgets. There must be documents somewhere that describe this, I would get the details wrong if I tried to do it here. The worst way is to specify font= on each individual widget. This is all documented in the Tk manpages, and even if it's painful to wade through the Tcl syntax it's a valuable source of information. For a few widgets the information in the Tk manpages have been transcribed to the wiki. Links to online versions of the Tk manpages are also on the wiki. Be sure to take a look. Jeff
pgpMVk8xjK5Mx.pgp
Description: PGP signature
_______________________________________________ Tkinter-discuss mailing list [email protected] http://mail.python.org/mailman/listinfo/tkinter-discuss
