Text Attributes

Layout

Table 39-4 summarizes two simple text layout attributes: justify and wrapLength. The text widget has several more layout-related attributes, and Chapter 33 describes those in detail. The two attributes described in this section apply to the various button widgets, the label, entry, and message widgets. Those widgets are described in Chapters 27, 29, and 31. The justify attribute causes text to be centered, left-justified, or right-justified. The default justification is center for all the widgets in the table, except for the entry widget, which is left-justified by default.

The wrapLength attribute specifies how long a line of text is before it is wrapped onto another line. It is used to create multiline buttons and labels. ...

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.