Blocking returns in a locked text field
Mike Bonner
bonnmike at gmail.com
Sun May 22 08:09:31 EDT 2011
You can use returninfield and enterinfield for this, if you put the
following in the script for the field.
*on returninfield*
* exit returninfield*
*end returninfield*
*
*
*on enterinfield*
* exit enterinfield*
*end enterinfield*
as long as you don't pass enterinfield or returninfield the enter and return
keys will be ignored by the field.
On Sun, May 22, 2011 at 1:06 AM, Joe Lewis Wilkins <pepetoo at cox.net> wrote:
> Earlier I thought I had a solution for this, but I'm not happy with what
> I've come up with. Anyone have a simpler/better solution?
>
> I put the following into the field's script and it works - kind of, but not
> until the user leaves the field:
>
> on mouseOver
> global gTemp
> lock screen
> put me into gTemp
> end mouseOver
>
> on mouseleave
> global gTemp
> if the number of lines in the me > the number of lines in gTemp then put
> gTemp into me
> unlock screen
> end mouseleave
>
> This is a real kludge. There must be a better way.
>
> Thanks everyone!
>
> Joe Lewis Wilkins
> Architect
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list