RichEdit does not respect PlainText with inserted content

I create a new application, drop TRichedit and set the PlainText property to true. Then I launch the application and paste some rich rich text into RichEdit.

I expect it to display as plain text, however it displays formatted content.

Does anyone know how to use TRichedit as plain text (and not use a note :))

+3
source share
1 answer

You will need to insert manually to ignore formatting.

if Clipboard.HasFormat(CF_TEXT) then
  RichEdit.SelText := Clipboard.AsText; 

Run this code from the message handler forWM_PASTE .

, CTRL+V . WM_PASTE .


, :

  • , .
  • TRichEdit CNNotify.
  • EN_PROTECTED, msg=WM_PASTE, 1 , , ( ) .
+5

All Articles