Graham,

Thanks that works for me....

Note that you can replace the -1 with the line number you want..



----- Original Message -----
From: "Graham Mayes" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Monday, 30 July 2001 22:31
Subject: RE: [DUG]: RICHEDIT CaretPos := xxx


> If The user points at a line, the line number containing the caret can be
> established. If you can 'reverse engineer' this I would love to hear.
>       LineBeg:=SendMessage(RichEdit2.handle,EM_LINEINDEX,-1,0);
>
> LineEnd:=LineBeg+SendMessage(RichEdit2.handle,EM_LINELENGTH,LineBeg,0);
>       SendMessage(RichEdit2.handle,EM_SETSEL,LineBeg,LineEnd+1);
> Graham
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Rohit Gupta
> Sent: Sunday, 29 July 2001 04:23 p.m.
> To: Multiple recipients of list delphi
> Subject: [DUG]: RICHEDIT CaretPos := xxx
>
>
> How do I set the caret position on a particular line in a Trichedit ?
>
> CaretPos gives me the position of teh caret in lines/columns but its read
> only.
>
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to