How do I force a key to enter just one character when being	pressed?
    John Dixon 
    dixonja at hotmail.co.uk
       
    Wed Jan 19 05:49:54 EST 2011
    
    
  
In the script of fld "text"...
on keyDown theKey
   if the number of chars of fld "text" > 0 then
      beep
      exit keyDown
   else
      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")
>   then
>   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?
> 
> greetings,
> 
> William
 		 	   		  
    
    
More information about the use-livecode
mailing list