Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 108
Registered: ‎08-05-2008
My Device: Not Specified

Field Full - how to make it go away

I have a TextField with a maximum length of 16 chars.  When the user tries to type more than that, a message box pops up saying "Field Full".  How can I make the message box go away.  Instead, the textbox should do nothing when the limit is exceeded.
Posts: 507
Registered: ‎07-15-2008
My Device: Not Specified

Re: Field Full - how to make it go away

[ Edited ]

Extend TextField class and override


protected boolean keyChar(char character,
int status,
int time)


Specify DEFAULT_MAXCHARS when you invoke TextField parent constructor. And use your own parameter to limit the field length. Check the field length into keyChar() method and act according to your rules.

Message Edited by rafo on 09-25-2008 03:52 PM
if your issue solved set "Solution" mark at the relevant post