Mirror

How to paint a border around text in a TRichEdit (Views: 700)


Problem/Question/Abstract:

How to paint a border around text in a TRichEdit

Answer:

procedure TForm1.Button1Click(Sender: TObject);
var
  r: TRect;
begin
  richedit1.perform(EM_GETRECT, 0, lparam(@r));
  Inflaterect(r, -5, -5);
  richedit1.perform(EM_SETRECT, 0, lparam(@r));
end;

<< Back to main page