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

Trusted Contributor
Posts: 178
Registered: ‎02-20-2011
My Device: 8700
My Carrier: at&t
Accepted Solution

Right Field In Title


I made a custom title and can't position the option button to the right corner!



HorizontalFieldManager title_hfm = new HorizontalFieldManager(Manager.USE_ALL_WIDTH);

title_hfm.add(new BitmapField(Bitmap.getBitmapResource("icon.png")));

title_hfm.add(new LabelField(" AppScreen ",Field.FIELD_VCENTER));

title_hfm.add(new ButtonField("Option",Field.FIELD_RIGHT));




Anyone did this before?Thanks in advance.

# I tried to change the world, but I couldn't find the source code #

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

Re: Right Field In Title

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: 159
Registered: ‎02-17-2011
My Device: Not Specified

Re: Right Field In Title


@ur code line:


HorizontalFieldManager title_hfm = new HorizontalFieldManager(Manager.USE_ALL_WIDTH);


@change it with below line


HorizontalFieldManager title_hfm = new HorizontalFieldManager(HorizontalFieldManager.FIELD_RIGHT);

Posts: 231
Registered: ‎03-16-2011
My Device: 9700, 9550, and JDE
My Carrier: AIRTEL, BSNL

Re: Right Field In Title

instead of HFM use VFM, with style: use_all_width

available on: Monday to Friday, Indian standard (day) time : )
  • Give kudos by clicking on the star icon to say "Thanks!" if you feel this response is helpful.
  • Click "Accept as Solution" if this post was what you needed. so that people who are trying to help will not waste their time reading a thread where no help is needed.