How to set a field to Caps or TitleCaps
J. Landman Gay
jacque at hyperactivesw.com
Tue Mar 11 18:07:41 EDT 2008
FlexibleLearning at aol.com wrote:
> Anyone figured out how to force a field to display text as Caps only, or as
> TitleCaps, whatever the state of the capsLock key, AND as the user is typing?
> It's this last bit that has me beat at the moment.
> This doesn't work but I wish it did as a starting point...
> on keyDown tk
> put toUpper(tk) into tk
> pass keyDown
> end keyDown
Don't pass the message. You can't replace the keystroke that is passed
to the engine, but you can put a different keystroke directly into the
field instead. Change the handler to:
on keydown tk
put toUpper(tk) into the selection
Make sure you place this handler only into the field it controls, or
else check to be sure the target is a field you want to work with.
Otherwise all typing in the card or stack will be blocked.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode