Text widgets like this one allow you to display information in a variety of styles. Display styles are controlled using a mechanism called tags. Tags are just textual names that you can apply to one or more ranges of characters within a text widget. You can configure tags with various display styles. If you do this, then the tagged characters will be displayed with the styles you chose. The available display styles are:

  1. Font You can choose any X font, large or small.
  2. Color You can change either the background or foreground color, or both.
  3. Stippling You can cause either the background or foreground information to be drawn with a stipple fill instead of a solid fill.
  4. Underlining You can underline ranges of text.
  5. Overstrikes You can draw lines through ranges of text.
  6. 3-D effects You can arrange for the background to be drawn with a border that makes characters appear either raised or sunken.
  7. Justification You can arrange for lines to be displayed
    left-justified,
    centered.
  8. Superscripts and subscripts You can control the vertical position of text to generate superscript effects like 10n or subscript effects like Xi.
  9. Margins You can control the amount of extra space left on each side of the text:
    This paragraph is an example of the use of margins. It consists of a single line of text that wraps around on the screen. There are two separate left margin values, one for the first display line associated with the text line, and one for the subsequent display lines, which occur because of wrapping. There is also a separate specification for the right margin, which is used to choose wrap points for lines.
  10. Spacing You can control the spacing of lines with three separate parameters. "Spacing1" tells how much extra space to leave above a line, "spacing3" tells how much space to leave below a line, and if a text line wraps, "spacing2" tells how much space to leave between the display lines that make up the text line.

    These indented paragraphs illustrate how spacing can be used. Each paragraph is actually a single line in the text widget, which is word-wrapped by the widget.

    Spacing1 is set to 10 points for this text, which results in relatively large gaps between the paragraphs. Spacing2 is set to 2 points, which results in just a bit of extra space within a paragraph. Spacing3 isn't used in this example.

    To see where the space is, select ranges of text within these paragraphs. The selection highlight will cover the extra space.