). Is this possible? I just wanna user to enter only letters (alphbets) and numbers (1,2,3, ..) Thankyou....."> GuiTextEditCtrl problem | Torque Game Builder | Forums | Community | GarageGames.com

Game Development Community

GuiTextEditCtrl problem

by Raja John · in Torque Game Builder · 12/17/2008 (5:04 am) · 2 replies

Hi,

In GuiTextEditCtrl i wanna restrict input special characters like (,.<>/?=+-"-!'@$%^&*()~'\|). Is this possible? I just wanna user to enter only letters (alphbets) and numbers (1,2,3, ..)

Thankyou.....

#1
12/17/2008 (9:26 am)
IIRC there's a callback which you can set through the "Command" property that gets called after each input received. From there, you can filter the control's text and kick stuff you don't allow.
#2
12/17/2008 (9:42 am)
Thanks for ur answer..

But i didn't know about "Command" property. Actually i am developing a game, in my game i store users(player name, score and level) in a profile. When game started the user must enter their name to get into the game further, in this input field i wanna the user enter Alphabets and Numbers only, not other special characters.

thanks again..