If you set a few tab stops in WordPad, the result might look like
this:
---snip---
{\rtf1\ansi\ansicpg1252\deff0\deflang1030{\fonttbl {\f0\fswiss\fcharset0
Arial;}}
{\*\generator Msftedit
5.41.15.1507;}\viewkind4\uc1\pard\tx1704\tx2840\tx 4544\f0\fs20 abc\tab
def\tab ghi\tab jkl\par
}
---snip---
The tab definitions in the example above are "tx1704\tx2840\tx4544".
Look up the RTF 1.5 specification for more details.
For some inspiration, have a look at this sample program:
http://www.codeproject.com/richedit/...cheditctrl.asp
Download the source and look at the "Do..." methods in the
file "RulerRichEditCtrl.cpp", esp. "DoIndent" where you will
find an interesting constant named "PFM_TABSTOPS.
Googling for this brings us to
http://tinyurl.com/bhzon
Fill out the PARAFORMAT2 structure correctly and send it to
the RichText control and you should be in business.
Perhaps there is already a .Net implementation/wrapper for this?
Otherwise you will have to take one of the many RichEdit
wrapper samples out there and extend it with the required
functionality.
Would be nice if Microsoft provided a decent wrapper out of the box.
The current wrapper is next to useless.
Hope any of this helps point you in the right direction, though
I am sure it is not what you were hoping for.
Joergen Bech
On 24 Dec 2005 19:52:52 -0800, "Stanley" <xs******@gmail.com> wrote:
Hi all! Can somebody tell me how to customize the tab stop position in
a rich text box? Just like we do in MS Word by clicking the ruler! I've
been searching the web but I can't find the answer! Please help me,
thanks in advance!