BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-23-2008, 05:24 PM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Model: Curve
PIN: N/A
Carrier: T-Mobile
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Layout Manager Help

Please Login to Remove!

My application is derived from the MainScreen so I am using the vertical layout manager as the default manager which is fine except I want a row of buttons at the bottom of the screen. How can I do this? (ie. Add label field, seperator field, list field, etc. (all vertical) but then a row of buttons at the bottom of the screen).
Offline  
Old 08-23-2008, 10:06 PM   #2 (permalink)
CrackBerry Addict
 
Join Date: May 2005
Location: Golden, CO US
Model: 9700
Carrier: ATT
Posts: 684
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Add a HorizontalFieldManager to the default VerticalFieldManager, then add your buttons to the HFM.
Offline  
Old 08-24-2008, 08:50 AM   #3 (permalink)
New Member
 
Join Date: Aug 2008
Model: Curve
PIN: N/A
Carrier: T-Mobile
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, is there a way to have it always aligned with the bottom of the screen, instead of just stacked under my other fields?
Offline  
Old 08-24-2008, 10:01 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

Instead of adding the HorizontalFieldManager to the MainScreen use MainScreen.setStatus(Field hrm).
Offline  
Old 08-24-2008, 02:23 PM   #5 (permalink)
New Member
 
Join Date: Aug 2008
Model: Curve
PIN: N/A
Carrier: T-Mobile
Posts: 13
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Great, Is there a way to space the buttons evenly across the whole bottom?
Offline  
Old 08-25-2008, 10:08 AM   #6 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

You could either over ride the paint method of the buttons to make them the same size, or the paint method of the manager to space them evenly.
Offline  
Old 08-25-2008, 02:33 PM   #7 (permalink)
Thumbs Must Hurt
 
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Alternatively, you can precalculate the space you need and use setPadding on the button field.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.