O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Size

Most widgets have a width and height attribute that specifies their desired size, although there are some special cases. In all cases, the geometry manager for a widget might modify the size to some degree. The winfo operations described on page 573 return the current size of a widget.

Most of the text-related widgets interpret their sizes in units of characters for width and lines for height. All other widgets, including the message widget, interpret their dimensions in screen units, which are pixels by default. The tk scale command, which is described on page 582, controls the scale between pixels and the other measures. You can suffix the dimension with a unit specifier to get a particular measurement unit:

 c centimeters i inch m millimeters ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required