Page 1 of 1
The TAB width
Posted: Thu Apr 17, 2014 3:08 pm
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?
Posted: Thu Apr 17, 2014 5:26 pm
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:
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.