Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
|
Define a border for TMemos
This article has not been rated yet. After reading, feel free to leave comments and rate it.
The windows message EM_SETRECT allows to define a left and/ or right border in a TMemo field.
The following code sets the left border to 20 pixels:
 | |  | | var
Rect : TRect;
begin
SendMessage(Memo1.Handle, EM_GETRECT, 0, LongInt(@Rect));
Rect.Left := 20;
SendMessage(Memo1.Handle, EM_SETRECT, 0, LongInt(@Rect));
Memo1.Refresh;
end;
| |  | |  |
Comments:
|