The TAB width

General TRichView support forum. Please post your questions here
Post Reply
x_ginger
Posts: 12
Joined: Fri May 07, 2010 9:22 am

The TAB width

Post by x_ginger »

How can I change the width of the TAB position? And why does the RichViewEdit calculate a position of the first TAB char from the left side of the page, not from the paragraph beginning? It looks strange when the first TAB is shorter than the others. Can we change this behavior?
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

A (left-aligned) tab starts at the place of insertion and ends at the nearest tab stop position. So tabs do not necessary have the same size.

- The first position is where the line starts (LeftIndent+FirstIndent for the first paragraph line, or LeftIndent for next lines).
- If the line has a hanging indent, LeftIndent is a tab stop too.
- If ParaStyles[].Tabs are not empty, they define tab stops.
- And, finaly, to the right of the positions mentioned above, tab stops are placed every RVStyle.DefTabWidth

All the positions mentioned above are counted from rv.LeftMargin.

See the image:
Image
You can see that the first tab starts from LeftIndent+FirstIndent, and ends at the first tick on the ruler, then tabs ends at next ticks. Distance between ticks = RVStyle.DefTabWidth.
Post Reply