Link to home
Start Free TrialLog in
Avatar of Dippen
Dippen

asked on

How determine cursor position in TMemo component?

Hi!

This question seems so darn easy, but I haven't been able to figure it out yet.
Question: How do I determine the row and column-position of the cursor in an active TMemo component? The only thing I've found is SELSTART, which tells me how many characters into the document the cursor is positioned. But what about row and column??
   I've solved the problem myself by counting how many #13-characters there is from the start of the memos text until the SelStart-value, but when the cursor reaches line 15 or so it begins to slow down program execution. (I wrote it in Pascal... haven't been assemling much lately). Maybe the same routine in inline-assembler would be acceptably fast. The routine has to be able to manage memos up to 500 rows long without putting suryp in the system, though.

Thanks!

//Daniel, Sweden
ASKER CERTIFIED SOLUTION
Avatar of erajoj
erajoj
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial