Hi Glen,
One liner handler in the script of your field (if you please) :
on keyDown pKey
if (pKey is an integer) and (the number of chars of the selectedLine < 5) then pass keyDown
end keyDown
Best regards from Paris,
PS. My ears don't like beep ;-)
Le 23 avr. 05, � 12:50, Glen Bojsza a �crit :
I would like to limit the number of characters a user can input on any line in a scrolling field.
In the field script
on keydown theKey if theKey is not in " 0 1 2 3 4 5 6 7 8 9 - . " then beep exit keydown
No need exiting: nothing else can happen!
else
if (the length of me) > 4 then
beep
exit keydown
Same comment :-)
end if pass keydown end if end keydown
"if the length of me is > 4 then..." this works but limits the TOTAL field to 4 characters.
Amicalement,
Eric Chatonet. ---------------------------------------------------------------- So Smart Software
For institutions, companies and associations Built-to-order applications: management, multimedia, internet, etc. Windows, Mac OS and Linux... With the French touch ---------------------------------------------------------------- Web site http://www.sosmartsoftware.com/ Email [EMAIL PROTECTED]/ Phone 33 (0)1 43 31 77 62 Mobile 33 (0)6 20 74 50 86 ----------------------------------------------------------------
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
