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
New Developer
Posts: 84
Registered: ‎01-28-2009
My Device: Not Specified

Alligning of label fields

Hi to all,

 

I have to keep two label fields in HorizontalFieldManager, one Left allign and the other Right allign and then add the HorizontalFieldManager to VerticalFieldManager. I have used particular code but it is not giving me proper out:

 

HorizontalFieldManager hfm_date = new HorizontalFieldManager();
VerticalFieldManager vfm = new VerticalFieldManager();

 

Labelfield uploaded = new Labelfield(" Uploaded on",font2,model.fontderive,Color.BLACK); hfm_date.add(uploaded); Labelfield upload_date = new Labelfield("27-Apr-09",Labelfield.FIELD_RIGHT, font2, model.fontderive,Color.BLACK);

 

hfm_date.add(upload_date); vfm.add(hfm_date);

 Please provide me some guidance for the same.

 

Thank you,

nimesh.

 

Developer
Posts: 445
Registered: ‎07-15-2008
My Device: Not Specified

Re: Alligning of label fields

Please look at this Thread:

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=3780#M3780

If your question was answered, please accept it as a sollution and / or give Kudos ;-)
______________________________
Use the Search Field first! Maybe the question you want to ask already exists!
New Developer
Posts: 84
Registered: ‎01-28-2009
My Device: Not Specified

Re: Alligning of label fields

[ Edited ]

Thank you for you suggestion.

 

The solution you gave works for two buttons but I want to use for the following things:

 

Left Side:                                 Right Side:

--------------                                 ---------------      

LabelField                                 LabelField

LabelField                                 ButtonField

LabelField                                 BitmapField

 

Can setHorizontalQuantization( ) can help in this part. If yes then how can I use it.

 

 

Thank you,

nimesh

Message Edited by nimesh on 07-25-2009 05:25 AM
Developer
Posts: 696
Registered: ‎12-02-2008
My Device: Not Specified

Re: Alligning of label fields

Hi,

 

You can try using SpacerField , you can find code for this field in below mentioned thread

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=28663&query.id=27...

 

hope it will help you.

Regards,
Rajat Gupta.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish