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: 178
Registered: ‎02-20-2011
My Device: 8700
My Carrier: at&t
Accepted Solution

Right Field In Title

Hello,

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));

setTitle(title_hfm);

...

 

Anyone did this before?Thanks in advance.

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



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

Re: Right Field In Title

use
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800508/...
----------------------------------------------------------
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
Highlighted
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);

Developer
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.