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
Trusted Contributor
Posts: 138
Registered: ‎04-19-2012
My Device: No
My Carrier: Nokia

HorizontalFieldManager

can we add more than 2 fields on HorizontalFieldManager

 

 

HOw?

Developer
Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Re: HorizontalFieldManager

[ Edited ]

Why not, You can add like below

HorizontalFieldManager hfm = new HorizontalFieldManager(USE_ALL_WIDTH);
hfm.add(field1) ;
hfm.add(field2) ;

.

.

.

hfm.add(field6)

*****************************************************************************
* Give kudos when you like it
* Mark it as a solution if it fixes your issue
Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: HorizontalFieldManager

just in case, what may have tripped you: some fields use the whole width, for example editfield, radiobuttonfield etc.
if you use such a field you have to limit its width, for example by overwriting getPreferredWidth (or sublayout, or...).

otherwise your additional fields will be added, but not be visible on the screen.
----------------------------------------------------------
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
Trusted Contributor
Posts: 138
Registered: ‎04-19-2012
My Device: No
My Carrier: Nokia

Re: Focusable problem in HorizontalFieldManager

I added 4 labelfields on HorizontalFieldManager and i want to make this Horizontal FOCUSABLE

 

 

hOW IT LL?

HorizontalFieldManager hfm = new HorizontalFieldManager(HorizontalFieldManager.FOCUSABLE |HorizontalFieldManager.USE_ALL_WIDTH);
     
      
      
       hfm.add(new LabelField("Himanshu"));
       hfm.add(new LabelField("Himanshu"));
       hfm.add(new LabelField("Himanshu"));
       hfm.add(new LabelField("Himanshu"));
       add(hfm);   

 

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

Re: Focusable problem in HorizontalFieldManager

you can make the labelfields focusable, doing it with the manager is only possible by doing some climbs.
did you solve your original problem? please mark the thread as solved and open a new one for the new question.
----------------------------------------------------------
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