Text Attributes

Table 33-10 lists the attributes for the text widget. The table uses the resource name, which has capitals at internal word boundaries. In Tcl commands, the attributes are specified with a dash and all lowercase:

Table 33-10. Text attribute resource names.
backgroundBackground color (also bg).
borderWidthExtra space around the edge of the text.
cursorCursor to display when mouse is over the widget.
exportSelectionIf true, selected text is exported to the selection.
fontDefault font for the text.
foregroundForeground color (also fg).
heightHeight, in text lines.
highlightBackgroundFocus highlight color when widget does not have focus.
highlightColorColor for input focus highlight border.
highlightThicknessWidth of highlight border.
insertBackground ...

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.