EControl Ltd. Forum Index EControl Ltd.
VCL libraries and software support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Movement of cursor position

 
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor
View previous topic :: View next topic  
Author Message
jfcarbel



Joined: 13 Jun 2006
Posts: 27

PostPosted: Thu Jun 15, 2006 6:12 am    Post subject: Movement of cursor position Reply with quote

How do I do the following programatically?

1. get x,y current position of cursor

2. goto specific line number

3. get text of line at cursor position x,y
Back to top
View user's profile Send private message
jfcarbel



Joined: 13 Jun 2006
Posts: 27

PostPosted: Thu Jun 15, 2006 6:13 am    Post subject: Reply with quote

Posted by: econtrol (IP Logged)
Date: May 31, 2006 11:38AM

1.
Code:
TSyntaxMemo.CaretPos: TPoint

2.
Code:
SyntaxMemo1.CaretPos := Point(SyntaxMemo1.CaretPos.X, NewLineIndex)

3.
Code:
if SyntaxMemo1.Lines.Count > 0 then
  S := SyntaxMemo1.Lines[SyntaxMemo1.CaretPos.Y]
else
  S := '';


Michael.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group