__alex
asked on
TMemo cursor issue
Example:
My memo shows line 0 to 9 and its count is 30 (-> scrollbars show up). I set my cursor to line 15 via SelStart. How can I make my memo show the cursor, i.e. scroll to line 15.
My memo shows line 0 to 9 and its count is 30 (-> scrollbars show up). I set my cursor to line 15 via SelStart. How can I make my memo show the cursor, i.e. scroll to line 15.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
A simple call to SelLength does it? Weird...
>A simple call to SelLength does it? Weird...
not really weird
internal is called then th em_setsel message
part from the docu about em_setsel
------------------------
In previous versions of Windows, the wParam parameter is a flag that is set to FALSE to scroll the caret into view or set to TRUE to omit the scrolling. A Win32-based application should use the EM_SCROLLCARET message to scroll the caret into view.
------------------------
guess it works because of this
meikl ;-)
not really weird
internal is called then th em_setsel message
part from the docu about em_setsel
------------------------
In previous versions of Windows, the wParam parameter is a flag that is set to FALSE to scroll the caret into view or set to TRUE to omit the scrolling. A Win32-based application should use the EM_SCROLLCARET message to scroll the caret into view.
------------------------
guess it works because of this
meikl ;-)
ASKER
SelLength := 1;
SelLength := 0;