Page 1 of 1

Missing Field Behavior Properties

Posted: Fri Jun 17, 2011 7:43 pm
by townsend
I can't seem to find a couple of common field behavior properties.

The Text Entry Field defaults to multi-line.
How do I set text fields as single line?

At this point I'm thinking I have to place code in each field with a
on returnInField ... end returnInField routine, then escape out
with a send or dispatch command. Is there a simpler way?

Also, is there a password property where asterisks are replaced for letters?

Re: Missing Field Behavior Properties

Posted: Fri Jun 17, 2011 11:52 pm
by Mark
Hi,

This is sufficient to disable return and enter:

Code: Select all

on returnInField
end returnInField
on enterInField
end enterInField
You might want to take care of pasted text as well. E.g. show an error if the clipboardData["text"] contains cr and don't allow the text to be pasted.

I have a password library on my website. Just scroll down a little.

Best,

Mark

Re: Missing Field Behavior Properties

Posted: Sat Jun 18, 2011 1:45 am
by SparkOut
It may or may not be sufficient for your needs, but also check the "autoTab" property. If the autoTab of a field is set to true, then hitting the return key will move the focus to the next field, as if the tab key navigation had been done.

Re: Missing Field Behavior Properties

Posted: Mon Jun 20, 2011 5:04 pm
by townsend
Thanks Mark!! I learned a lot from you Password routine.

Plus-- I download lots of other good code examples from your website,
Free and Shareware Products for Developers
This is a great find-- for any LiveCode developer.

Also, good tip SparkOut-- now I know what that autoTab property is.