Delphi .NET (2) Database (71) Delphi IDE (90) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280)
Exchange Links About this site Links to us 
|
Have a TMemo/ TRichEdit scroll to the cursor position
9 comments. Current rating: (4 votes). Leave comments and/ or rate it.
After placing the cursor at the desired position using the SelStart property,
you should use the EM_SCROLLCARET message to scroll the caret into view,
as shown in the piece of code below.
(To set the SelStart property to a x/y coordinate, also read this tip:
Access the current row/column of a TMemo.)
 | |  | |
SendMessage(Memo1.handle, EM_SCROLLCARET,0,0);
| |  | |  |
Comments:
|
|
|
|
THanks !!!! That's just what i needed
|
|
|
|
|
That was what I needed to! I used these lines to scroll to bottom of a log file:
RichEdit1.SelStart := MaxInt;
SendMessage(RichEdit1.handle, EM_SCROLLCARET,0,0);
|
|
|
|
|
very usefull - thanks
|
|
|
|
|
Many Thanks
|
|
|
|
|
I needed that! Thank you!
|
|
|
|
|
THX man! You save my life
|
|
|
|
|
nice
|
|
|
|
|
The EM_SCROLLCARET on Win2000+ doesn't work with the window minimized. Is there a way to solve this?
|
|
|
|
|
Thank you - it was short, clear and solved the problem.
|
|