Link to home
Start Free TrialLog in
Avatar of LeTay
LeTay

asked on

Move botton of a TMemo or TRichEdit

I use the following code to fill in a TRichEdit with some text lines (Object is either a TMemo or a TRichEdit component)

     Object.Lines.Add(Text]);
     SendMessage(Object.Handle,WM_VSCroll,SB_LINEDOWN,0);

If Text comes visually on one single line, it's okay
But if it comes on several line (longer that the object width), then the text is not entirely visible at the botton
How can I really force it to be ?
ASKER CERTIFIED SOLUTION
Avatar of Ephraim Wangoya
Ephraim Wangoya
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

or even simpler

SendMessage(Object.Handle, EM_LINESCROLL, 0, Object.Lines.Count);
Avatar of LeTay
LeTay

ASKER

Exactly what I was looking for !
Many thanks !