tabs

Specifies a set of tab stops for the window. The option's value consists of a list of screen distances giving the positions of the tab stops. Each position may optionally be followed in the next list element by one of the keywords

  • left,
  • right,
  • center, or
  • numeric,

which specifies how to justify text relative to the tab stop.

Left is the default; it causes the text following the tab character to be positioned with its left edge at the tab position.

Right means that the right edge of the text following the tab character is positioned at the tab position.

Center means that the text is centered at the tab position.

Numeric means that the decimal point in the text is positioned at the tab position; if there is no decimal point then the least significant digit of the number is positioned just to the left of the tab position; if there is no number in the text then the text is right-justified at the tab position.

For example, -tabs {2c left 4c 6c center} creates three tab stops at two-centimeter intervals; the first two use left justification and the third uses center justification. If the list of tab stops does not have enough elements to cover all of the tabs in a text line, then Tk extrapolates new tab stops using the spacing and alignment from the last tab stop in the list. The value of the tabs option may be overridden by -tabs options in tags.

If no -tabs option is specified, or if it is specified as '(), then Tk uses default tabs spaced every eight (average size) characters.


© Author | Home | Sitemap