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

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -