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

Adobe AIR Development

Reply
Developer
AppStoreLover
Posts: 297
Registered: ‎10-30-2010
My Device: PlayBook
My Carrier: other

"cellForRowAtIndex" equivalent? CustomCellRenderer?

[ Edited ]

I am looking for a callback method that is called by list for every cell  that is to be rendered. I need to dynamically draw images and text on cells at run time based on a data array's properties for the particular cell index.

 

How would I achieve that?

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: "cellForRowAtIndex" equivalent? CustomCellRenderer?

Have you looked at the renderers draw() method?

Please use plain text.
Developer
AppStoreLover
Posts: 297
Registered: ‎10-30-2010
My Device: PlayBook
My Carrier: other

Re: "cellForRowAtIndex" equivalent? CustomCellRenderer?

[ Edited ]

I don't see a draw method mentioned anywhere?

 

I checked the  ICellRenderer interface: http://www.blackberry.com/developers/docs/airapi/1.0.0/qnx/ui/listClasses/ICellRenderer.html

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: "cellForRowAtIndex" equivalent? CustomCellRenderer?

It's undocumented.  There is a protected method called draw() and drawLabel() that lets you do fine tune control of each cell.  But it is tricky (be warned)

Please use plain text.