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
New Developer
pc
Posts: 16
Registered: ‎08-03-2009
My Device: Not Specified
Accepted Solution

Repaint one of the field in the main screen

Hi all,

 

I have a main screen , which is displaying custom titlebar and a custom tollbar.

After that i have vertical field manager, in that i added a listfield.

 

I want to update the listfield with new data , but i don't want to change anything on the mainscreen other than listfield.

 

How can i do this

 

Please help  

Please use plain text.
Developer
amardeepjaiman
Posts: 293
Registered: ‎02-25-2009
My Device: Not Specified

Re: Repaint one of the field in the main screen

 USe listfield.invalidate();

 

it will only repaint the ListField by calling drawListRow () method again.

 

 

 

~Amardeep

www.impetus.com

Please use plain text.
New Developer
New Developer
pc
Posts: 16
Registered: ‎08-03-2009
My Device: Not Specified

Re: Repaint one of the field in the main screen

Hi Amardeep,

 

Thank you for your quick reply.

 

Where i will pass the new data.

 

For first time i am putting the listfield  data inside a vector in the class's constructor.

 

For updating the listfield with new data , how i will pass the new data?

 

Please help me... 

Please use plain text.
Developer
bikas
Posts: 984
Registered: ‎02-10-2009
My Device: Not Specified

Re: Repaint one of the field in the main screen

[ Edited ]

Create a public method inside the class and inside the method:

a. update the vector with new data

b. call invalidate();

 

Now when you need to update the list just call that method.

 

Regards

Bikas

Message Edited by bikas on 08-26-2009 02:30 PM
Please use plain text.
Developer
amardeepjaiman
Posts: 293
Registered: ‎02-25-2009
My Device: Not Specified

Re: Repaint one of the field in the main screen

Correct. The vector, array you are using to draw the rows of list, first update that vector before invalidate the listfirld. Now invalidate() will repaint the list with new values. :smileyhappy:

 

 

~Amardeep

www.impetus.com

Please use plain text.