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
Regular Contributor
Posts: 74
Registered: ‎12-30-2010
My Device: Blackberry Bold 9700
My Carrier: Vodafone.
Accepted Solution

How to use ListField UI component dyanamically

Hello Friends,

 

i'm new in BB

 

i want to use ListField UI component ..,

I'm using SDK 5.0  ., 

in this component i need to add & remove items dyanamically .,

 

So please tell me how i can do this ...?

 

Thanks .,

Nilesh

 

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

Re: How to use ListField UI component dynamically

Depending on how you use the Field, there are delete and insert options available.  You can also set the size and then invalidate() the entire ListField.  These options are available via appropriately named method calls in the ListField.  Have a look at he API.

 

Alternatively you can create a new ListField with your updates and replace the existing ListField with your new one. 

 

Any  these options should work, you need to choose the one that is easiest for you.  I must admit I typically use the replace option.  . 

 

Anyway, review the documentation, give them a try and let us know how you get on. 

Regular Contributor
Posts: 74
Registered: ‎12-30-2010
My Device: Blackberry Bold 9700
My Carrier: Vodafone.

Re: How to use ListField UI component dynamically

Thanks for reply.,

 

my problem get solved...

 

Thanks.,

Nilesh

 

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

Re: How to use ListField UI component dynamically

Thansk for letting us know.  Can you please mark this Thread as solved?  Instructions in the Help link near the top if you need them.