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
Developer
Posts: 68
Registered: ‎07-21-2008
My Device: Not Specified

Can we add controls to the LIstField?

I am developing one listField. In which I want to add checkBox image, Labelfield and Again one Arrow image.

 

Is it possible to add controls to the Listfield.

 

I am new to BB can anyone please explain me?

Developer
Posts: 507
Registered: ‎07-15-2008
My Device: Not Specified

Re: Can we add controls to the LIstField?

You may override drawListRow() method of ListFieldCallback instance to draw checked and unchecked checkbox character depending on your row state. These characters are defined in Caracters class.

 

Also you may use method setRowHeight() of ListField class instance to set every row height in pixels.

 

Inside of drawListRow() use graphics context to draw anything you want. This method invokes to draw every list row.

----------------
if your issue solved set "Solution" mark at the relevant post
Developer
Posts: 16,495
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Can we add controls to the LIstField?

it is not possible to focus the control elements without further work, though. you can display them, that's all.
----------------------------------------------------------
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