0
votes

I want to know the method or the code that I can use to have the selected text from the RichEdit in VCL on C++Builder XE5.

I can change the color of selected text with this code :

re->SelAttributes->Color = TheColorWanted;

But I don't know how can I proceed to show for example the selected text in the RichEdit.

1
It is not clear whether you want to GET the selected text, OVERWRITE text that is already selected, or HIGHLIGHT new text to make it selected. Please clarify your question.Remy Lebeau

1 Answers

0
votes

Look at the RichEdit's SelStart, SelLength and SelText properties.