Author: Jonas Bilinkevicius
How to paint a border around text in a TRichEdit
Answer:
1 procedure TForm1.Button1Click(Sender: TObject);
2 var3 r: TRect;
4 begin5 richedit1.perform(EM_GETRECT, 0, lparam(@r));
6 Inflaterect(r, -5, -5);
7 richedit1.perform(EM_SETRECT, 0, lparam(@r));
8 end;