Welcome! Log In Create A New Profile

Advanced

Place cursor at specific position in memo

Posted by Willy 
Place cursor at specific position in memo
December 14, 2021 11:06AM
I think the title says it already.

Is there a function I can call that will move the cursor to position 15 in a memo, for example.
In my case the cursor should be at the beginning of line 2 by default.

Thanks,
Willy Hermans.
Argus
Re: Place cursor at specific position in memo
December 14, 2021 01:41PM
you should use the ..cursor and ..endcursor properties of the field.

There are two properties because you CAN "select" a text with them. In order to position the cursor somewhere, put the same value in both.

As for the beginning of line 2; just look for position of CR in the field, then add 2, and you should be there
Re: Place cursor at specific position in memo
December 16, 2021 10:00AM
This works.

Thanks a lot.

Willy.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: