Quantcast
Channel: Offset problem in RichTextBox
Viewing all articles
Browse latest Browse all 3

Offset problem in RichTextBox

$
0
0

 

Using simple text of the form: Abs(a), I tried to set the offset to 4 using:

 

int nOffset = 4;

TestPointer tp = myRtb.Document.ContentStart.GetPositionAtOffset(nOffset,

LogicalDirection.Forward);

myRtb.CaretPosition = tp;

 

This put me at character offset 2 instead of 4.  There is a non-public data member, character offset in tp whose value is 2.  That shows the problem pretty clearly.  If only I could just set that...

 

 


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images