BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-24-2007, 02:36 PM   #1 (permalink)
New Member
 
Join Date: Jul 2007
Model: 7100T
PIN: N/A
Carrier: Verizon
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default UI Layout question -- setting fixed height

Please Login to Remove!

My application currently looks like this -->


MainScreen (no scroll)
....HorizontalFieldManager (no scroll)
........Button
........Button
....VerticalFieldManager (yes scroll)
........BrowserField

so whats happenning is the two buttons are set to always appear at the top,
and the BrowserField then appears underneath (taking up 'up to' the remainder of the screen, and then scrolling if it takes up more space).

What I'd like to do is flip this so the buttons are on the bottom. Unfortunately, I cant figure out how to set the height of the VerticalFieldManager to a fixed height (and then have it scroll the overflow). What it does right now is it will take up the entire screen, and the HorizontalFieldManager ends up off screen.

Desired UI -->
--------------------
|Field that scrolls|
|..................|
|..................|
|..................|
|..................|
|..................|
--------------------
| Button1 Button 2 | (Buttons always appear anchored at the bottom)
--------------------

Is there any way to do this using the VerticalFieldManager; or is there a code sample using a different method that accomplishes the same?
Offline  
Old 07-24-2007, 03:30 PM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you might try creating a class that extends vertical field manager and overriding the getPrefferedHeight method to return a figure of your choice
Offline  
Old 08-02-2007, 01:35 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
Posts: 44
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you may try to set the VerticalFieldManager as statusField. This will be always displayed and is located on the bottom of the screen.
Screen.setStatus(your VerticalFieldManager)

to instantiate your MainScreen, you will maybe have to use this.setStatus()
Offline  
Old 08-02-2007, 04:30 AM   #4 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

just add the field manager that contains the buttons to the status area of the screen:

HorizontalFieldManager hfm = new HorizontalFieldManager();
hfm.add(myButton1);
htm.add(myButton2);

setStatus(hfm);

[edit - oops, previous poster said the same thing]
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 08-02-2007, 06:38 AM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
Posts: 44
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

so, if we both agree - it should work
Offline  
Old 08-02-2007, 07:01 AM   #6 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you'd think so but this IS the blackberry api we're dealing with... you learn to love it and it's quirks
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
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.