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

New Developer
Posts: 1
Registered: ‎11-14-2009
My Device: Not Specified

adding items to listField

I am brand new to java and blackberry development. Everything I have done I've searched and found my answers but for some reason I cant find anything adding items to a fieldList.  I think Im suppose to use drawListRow but I can not get it set up correctly.  I have made the list and added it to the screen with:


ListField listField = new ListField(20);


I try to use drawListRow but I cant figure out the syntax.  Thanks for your help.

Forums Veteran III
Posts: 3,795
Registered: ‎02-09-2009
My Device: Bold 9930 OS + Playbook 64Gb

Re: adding items to listField

Hi and welcome to the forums! :smileyhappy:

A couple of places for you to visit: Blackberry 101 Tips & Tricks


Have you tried over here:   Java Development


Happy to have you here! :smileyvery-happy:

Please remember to "Accept as Solution" the post which solved your thread. If I or someone else have helped you, please tell us you "Like" what we had to say at the bottom right of the post.
Elite II
Posts: 9,321
Registered: ‎04-01-2008
My Device: Torch 9800
My Carrier: grameenphone

Re: adding items to listField


Hi kdkrgs,


Welcome to BlackBerry support community forums. We're glad to have you in the community.


Have fun and enjoy your stay!


If your query is resolved then please click on Accept as Solution

Click on the LIKE on the bottom right if the post deserves credit

Posts: 16,644
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: adding items to listField

to draw the listfield you use the listrowcallback, seems you have this figured out correctly.

You have to implement the methods of the interface yourself.


drawListRow is similar to other paint methods, you have a low level access to graphics (which represents the area you can paint on). see the Graphics class for an overview of methods.

To get you started you can use drawText(string,x,y), with x = 5, y from the drawListRow parameters and string as the textual representation of your object.


The knowledge base has some samples of listfield usage:





feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter