Forcing Uppercase in text entry field

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Nomi
Posts: 19
Joined: Wed Feb 27, 2008 4:08 pm

Forcing Uppercase in text entry field

Post by Nomi » Fri Apr 18, 2008 3:00 am

I need to keep the input of a text entry field all in Uppercase. Is there either a way to do this at input, or a way to change the results to all uppercase after input?

Thanks!

- Noel

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Fri Apr 18, 2008 9:06 am

Hi Nomi,

put this into your field(s):

Code: Select all

on closefield
  if me <> empty then
    repeat for each char i in me
      put toupper(i) after new_content
    end repeat
    put new_content into me
  end if
end closefield 
Tested, works and will probably do what you want :-)


Best

Klaus

Nomi
Posts: 19
Joined: Wed Feb 27, 2008 4:08 pm

Post by Nomi » Fri Apr 18, 2008 4:55 pm

Worked perfectly! Thank you :)

- Noel

Post Reply