I'm pretty new to Delphi, so this may sound like a stupid question, but how can I scroll the caret in a RichEdit to an exact position say something like (line5,char10)?
You can move it to a particular character by setting SelStart.
You can move to a particular character and force that character to be visible as follows:
Code:
Memo1.SelStart := 0; // move the cursor to the start of the Memo, and
Memo1.SelLength := 1; // highlight a character, in order to move the scroll bars back to the top left.
Memo1.SelLength := 0; // Then unhighlight the character again.
To move to a particular x,y pos: you could either do some arithmetic based on adding up line lengths, or you could shoot, read Caret to see how you scored, and shoot again. -- Doug Burbidge mailto:doug@ultrazone.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.