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: 8
Registered: ‎09-17-2008
My Device: Not Specified

HorizontalFieldManager inside a Field

[ Edited ]

Hi everyone!


We're making a Grid View for a bunch of data. I followed some examples in other forums, so basically I have a HorizontalFieldManger with one VerticalFieldMAnager in it per column like this (just without the main VerticalFieldManager, the Title and the SeparatorField)


Grid View 


 Our problem is that we would like to make this a Field. So we tried creating a custom Field by extending the Field class, and as an attribute we created a HorizontalFieldManager and in the constructor we would add all the VerticalFieldManagers and other stuff. But how do we paint this HorizontalFieldManager??? We can't add it to the cumtomField class. In the Field's paint method, we looked inside the HorizontalFieldManager to try to find like a paint method or something, but we couldn't find anything. So our final question would be...How do we paint everything??? do we have to go through every label and retrieve its text and paint it or what??

Message Edited by calo_11 on 10-23-2008 12:57 PM
BlackBerry Development Advisor
Posts: 15,874
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: HorizontalFieldManager inside a Field

Have you added your custom Field to an existing manager or screen?  Are you trying to do custom painting or just want to paint fields added to the managers in your diagram? 


You may also want to extend Manager instead of Field.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.