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.
| background | Background color (also bg). |
| borderWidth | Extra space around the edge of the text. |
| cursor | Cursor to display when mouse is over the widget. |
| exportSelection | If true, selected text is exported to the selection. |
| font | Default font for the text. |
| foreground | Foreground color (also fg). |
| height | Height, in text lines. |
| highlightBackground | Focus highlight color when widget does not have focus. |
| highlightColor | Color for input focus highlight border. |
| highlightThickness | Width of highlight border. |
| insertBackground | Color for the insert cursor. |
| insertBorderWidth | Size of 3D border for insert cursor. |
| insertOffTime | Milliseconds insert cursor blinks off. |
| insertOnTime | Milliseconds insert cursor blinks on. |
| insertWidth | Width of the insert cursor. |
| padX | Extra space to the left and right of the text. |
| padY | Extra space above and below the text. |
| relief | flat, sunken, raised, groove, ridge, or solid. |
| selectBackground | Background color of selected text. |
| selectForeground | Foreground color of selected text. |
| selectBorderWidth | Size of 3D border for selection highlight. |
| setGrid | Enable/disable geometry gridding. |
| spacing1 | Extra space above each unwrapped line. |
| spacing2 | Space between parts of a line that have wrapped. |
| spacing3 | Extra space below an unwrapped line. |
| state | Editable (normal) or read-only (disabled). |
| tabs | Tab stops. |
| takeFocus | Control focus changes from keyboard traversal. |
| width | Width, in characters, of the text display. |
| wrap | Line wrap mode: none, char, or word. |
| xScrollCommand | Tcl command prefix for horizontal scrolling. |
| yScrollCommand | Tcl command prefix for vertical scrolling. |