Padding and Anchors

Table 37-4 lists padding and anchor attributes that are similar in spirit to some packing attributes described in Chapter 23. However, they are distinct from the packing attributes, and this section explains how they work together with the packer

Table 37-4. Layout attribute resource names.
anchorThe anchor position of the widget.

Values: n, ne, e, se, s, sw, w, nw, or center.

Widgets: button, checkbutton, label, menubutton, message, or radiobutton.
padX, padYPadding space in the X or Y direction, in screen units. Widgets: button, checkbutton, label, menubutton, message, radiobutton, or text.

The padding attributes for a widget define space that is never occupied by the display of the widget's contents. For example, if you create ...

Get Practical Programming in Tcl & Tk, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.