Blocking returns in a locked text field
Joe Lewis Wilkins
pepetoo at cox.net
Sun May 22 10:11:17 EDT 2011
Ken and Mike, (actually the field is unlocked)
Thanks, I had yet to find these two messages. LC is so complex these days; however, I see they've been around since 1.0, so my bad. (smile) You guys are great!
Joe Lewis Wilkins
Architect
On May 22, 2011, at 5:09 AM, Mike Bonner wrote:
> 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
More information about the use-livecode
mailing list