04-28-2010 11:42 AM - edited 04-29-2010 03:54 AM
Hi Guys and girls,
I'm trying to customise my basic edit field to allow for 0-9 A-Z a-z and the underscore character. It's this underscore character which is proving to be a problem.
I've set the basic edit field to have the phone number style. Which works great until I tried to use the underscore character (i know i know phone numbers can't have underscores). I looked into extending the basic edit field and specifically overriding the keyChar function. However I got stuck, how do I preserve that key presses without the alt key enter numbers and key pressed with the alt key display the letters. Plus this pesky underscore character.
Anyhelp would be greatly greatly appreciated!
04-29-2010 04:01 AM
if you are trying to create your own edit field, then you can have your own list of validations. Please refer to CharacterUtilitis class which may help you.
04-29-2010 07:13 AM
Thank you Karan, you actually pointed me in the right direction. I managed to implement it in the end by extending a TextFilter and overriding the convert and validate meathods. Then I realised it wasn't actually wanted to do anyway... C'est la vie