Board index » delphi » Help: Inconsistent selected texts of TMemo and TRichEdit

Help: Inconsistent selected texts of TMemo and TRichEdit

I assigned the content of a TMemo to a TRichEdit.  Then I gave both TMemo and
TRichEdit same values of SelStart and SelLength.  I found the selected texts
of those two controls might be different.  Does anyone know what causes the
inconsistence?  Is there any way to correct it?  Any suggestion will be
appreciated.

Wayne Hsiao

 

Re:Help: Inconsistent selected texts of TMemo and TRichEdit


Quote
Wayne Hsiao wrote:

> I assigned the content of a TMemo to a TRichEdit.  Then I gave both TMemo and
> TRichEdit same values of SelStart and SelLength.  I found the selected texts
> of those two controls might be different.  Does anyone know what causes the
> inconsistence?  Is there any way to correct it?  Any suggestion will be
> appreciated.

> Wayne Hsiao

I am not certain, but rich text contains hidden codes with the text
format.  I could be that your selected text contains these codes and
counts them as they would normal characters.

Mike

Other Threads