This forum provides RSS feed. To query recent posts use this url. More...
Hello Venom, were you able to filter character input? If so, how? I don't want the player to submit only a blank "space" without letters.
var NewEditorText =new String(Editor.Text); if ((key >= 65 && key <=90) || (key >= 97 && key <= 122)) // A-Z or a-z { Editor.Text = NewEditorText; } else { if (key!=8) //backspace { var lenght = NewEditorText.Length; var ClearText = NewEditorText.Substr(0,lenght-1); //remove last digit Editor.Text = ClearText; } }
Ah, I see what Mnemonic meant by catching the change to the editor. Didn't realize that was possible. Very helpful, thanks For anyone needing this filter, append an equal sign to the operators to capture the letters Aa and Zz: <=, >=