Link to home
Start Free TrialLog in
Avatar of __alex
__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.
Avatar of __alex
__alex

ASKER

Actual workaround:

SelLength := 1;
SelLength := 0;
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany 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
SOLUTION
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
Avatar of __alex

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 ;-)