> Say, for example, a user has scrolled to the 5th char in a 20
> char word using the arrow keys. By pressing SHIFT+HOME the 5
> chars preceding the cursor should be selected. I will set the
> selStart to 1 but how can I set the selEnd - I need something
> like theCurrentCursorPosition. Equally, in the above
> situation, pressing SHIFT+END would select the 15 chars after
> the cursor position. Again, I can set the selEnd to the last
> char of the line, but how do I set the selStart.

when there is nothing selected, the selStart is the same as the selEnd AND
it IS the current cursor position! thus you would set first get the current
position by getting either the selStart or selEnd and putting it into a
temporary variable like pCurrentCursorPosition. then set the selStart to 1
and the selEnd to pCurrentCursorPosition.

HTH

Al Hospers
CamberSoft, Inc.
al<at>cambersoft<dot>com
http://www.cambersoft.com

A famous linguist once said:
"There is no language wherein a double
positive can form a negative."

YEAH, RIGHT



[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