How to create EditField Which accept only text in Blackberry? -


How to create EditField , which only accepts characters and does not allow any numerical , No special characters should be accepted in Blackberry.ie) which should accept the editfield only alphabetical characters.

You can create your own class (i.e. AlphaEditField) and it has expanded EditField then the key Override the insert function that you want, something like this:

  protected boolean keydown (int keycode, int time) {char ch = net.rim.device.api.ui.keypad .map (Encode); If (Character.isUpperCase (ch) || Character.isLowerCase (ch)) {return super.keyDown (keycode, time); }     return false; }  

Upper and lower case functions will change false for any character which can not be defined in the case, alias ... anything is not in alphabetical order.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -