How do I force a key to enter just one character when being pressed?
William de Smet
williamdesmet at gmail.com
Wed Jan 19 05:02:07 CST 2011
But with this script I limt the entry of the field to just one character.
My 'problem' is dat when you keep a key pressed down more characters
When you hold down the 'A' key AAAAAAAAAAA is entered.
I wish to limit that. Just one entry of a key when being hold
down/pressed al the time.
Any thoughts on this?
2011/1/19 John Dixon <dixonja at hotmail.co.uk>:
> In the script of fld "text"...
> on keyDown theKey
> if the number of chars of fld "text" > 0 then
> exit keyDown
> put theKey into fld "text"
> end if
> end keyDown
>> Hi there,
>> I limit text entry of fld "text" with following code.
>> on keyDown pKey
>> if (the formattedHeight of fld "text" < the height of fld "text")
>> pass keyDown
>> end if
>> end keyDown
>> One thing that I want to change now is a way to force a key to enter
>> just one character after being pressed/hold down.
>> Any thoughts on that?
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode