determining if cursor is in last line of a field

Mark Schonewille m.schonewille at economy-x-talk.com
Wed Sep 18 12:02:24 EDT 2013


Hi Richard,

There are probably many ways to do this, Here's one:

    put number of lines of the formattedText of  \
    char 1 to (word 2 of the selectedChunk) of me


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other 
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 9/18/2013 17:43, Dr. Hawkins wrote:

> If I have "my dog has fleas" in a field, the number of lines of this field
> is always 1.
>
> If the width of the field causes it to display as
>
>     my dog
>     has fleas
>
> and the cursor is after "has", the selectedLine is 2.
>
> But how do I determine that the number of lines, as formatted, in this
> field is 2?
>
> If someone hits a down arrow in the first line, I want to pass it to go to
> the second line, but if they hit it in the second, I want to jump to
> another field in another group.
>
>




More information about the use-livecode mailing list