0

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.

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
  • 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 Jul 01 '15 at 19:47

1 Answers1

0

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

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770