delphi - How to change background color of margins in RichEdit? -
i used following code add margins richedit. how can change background color?
procedure tform1.button1click(sender: tobject); var lrect: trect; begin lrect := richedit1.clientrect; inflaterect(lrect, -25, -25); richedit1.perform(em_setrect, 0, integer(@lrect)); end;
em_setrect
merely tells richedit rectangle allowed render text. change background color of margin reserving space for, have subclass richedit handle wm_paint
messages directly, can draw whatever want in space.
Comments
Post a Comment