Welcome!

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

Reply
New Developer
Posts: 32
Registered: ‎12-04-2008
My Device: Not Specified

How to Format Input fields

Hi all,

 

I have some problem to format the input values. For example, the price is a input it needs to be format the input like 1,000,000. Any one please help me to format the values.

 

Thanks in advance.

 

Prabahar A

Developer
Posts: 101
Registered: ‎07-20-2009
My Device: Not Specified

Re: How to Format Input fields

You mean to say, numeric type input field?

 

If so, you can set the filter to editfield to accept only numbers.

 

 

setFilter(TextFilter.NUMERIC);

 

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to Format Input fields

Search the forum, similar questions have been asked in the past.  However I think you will find that the there is no suitable formatter built-in.  You will have to do this yourself. 

New Developer
Posts: 32
Registered: ‎12-04-2008
My Device: Not Specified

Re: How to Format Input fields

I asked about the comma separator.
Highlighted
Developer
Posts: 101
Registered: ‎07-20-2009
My Device: Not Specified

Re: How to Format Input fields

In that case, as Peter said you have to create your TextFilter.