Well ... I just wrote a little program to demonstrate the problem and, of
course, it didn't demonstrate the problem! But here's the code which
convinces me that the RichTextBox.Tex t field changes when the SelectionStart
property is set ...
Target = rtb.Text.Substr ing(SSI + SSL + StartAdjust, FSL) 'for debugging
purposes only
rtb.Focus()
Target = rtb.Text.Substr ing(SSI + SSL + StartAdjust, FSL) 'for debugging
purposes only
rtb.SelectionSt art = SSI
Target = rtb.Text.Substr ing(SSI + SSL + StartAdjust, FSL) 'for debugging
purposes only
After the last statement the value of Target is different from the values of
Target resulting from the earlier Target= statements.
"eBob.com" <eB******@total lybogus.comwrot e in message
news:u%******** ********@TK2MSF TNGP03.phx.gbl. ..
After a lot of debugging effort I have to conclude that it does. Or at
least can. I take a substring (RichTextBox.Te xt.Substring) before setting
SelectionStart and after and get a different result. The second result
begins two characters to the right of the first.
In an earlier version of the program I did not have this problem. But in
that version the RichTextBox actually appeared on a form. In the version
of the program with the problem the RichTextBox is never added to a form.
I don't know if I am asking a question or reporting a bug.
Bob