[Lazarus] TEdit: Find character at caret position

2015-08-02 Thread Jürgen Hestermann

In a TEdit component, how do I find out which character is at the caret/cursor 
position?
Or in other words: At which (string) position will the next typed character be 
inserted?
I want to insert text at just that position myself but cannot find out where 
this (character) position would be.

Any help appreciated.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TEdit: Find character at caret position

2015-08-02 Thread Howard Page-Clark

On 02/08/2015 18:33, Jürgen Hestermann wrote:

In a TEdit component, how do I find out which character is at the
caret/cursor position?
Or in other words: At which (string) position will the next typed
character be inserted?
I want to insert text at just that position myself but cannot find out
where this (character) position would be.


Edit1.SelStart gives the character position of the caret/cursor. The 
next typed character is inserted at Succ(Edit1.SelStart).


Howard


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus