I have to intercept and translate every keystroke in an editable text 
member (because I'm bulding a Russian keyboard layout into the movie), so I 
want to interpret the Home and End keys correctly as well. (If I simply 
PASS End along, it prints a rectangle, a non-displayable character.) I want 
the Home key to move the insertion point to the beginning of the current 
(soft) line, and the End key to move it to the end of this line. So I need 
to know where the lines wrap in my text box.

The only way I could figure out how to do it is this monstrosity:

CurrInsPointPos = member(x).selection[1]
CurrInsPointLocV = member(x).charPosToLoc(CurrInsPointPos)[2]
FirstCharInLinePos = member(x).locToCharPos(point(0, CurrInsPointLocV))
--now position the insertion point at the beginning of the line:
member(x).selection = [FirstCharPos-1, FirstCharPos-1]

This works, but I can't help thinking that there must be a better way... 
(It's even uglier for the end-of-line position).

Is there a better way? A property or function I overlooked? Thanks!

Slava


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to