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

Posts: 30
Registered: ‎12-02-2010
My Device: BlackBerry 8520
My Carrier: Mobilink

Re: Align to bottom of vertical field manager

Hello you can use


setStatus(Managers or etc);


to add any manager at the bottom of the screen.

Adil Soomro

Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Align to bottom of vertical field manager

FIELD_TOP, FIELD_BOTTOM and FIELD_VCENTER are ignored by VerticalFieldManager, just like FIELD_LEFT, FIELD_LEADING, FIELD_RIGHT, FIELD_TRAILING and FIELD_HCENTER are ignored by HorizontalFieldManager. These managers have their own policy of vertical and horizontal positioning, respectively.


Your solution, therefore, is the most elegant one. Just replace getPreferredHeight() with getHeight() - at that point your footer manager has been laid out just like everything else, so it already knows its actual height.

please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
New Contributor
Posts: 4
Registered: ‎06-26-2011
My Device: 9550i Storm2
My Carrier: Verizon

Re: Align to bottom of vertical field manager

Thanks! This was exactly what I needed to solve very similar problems. Life saver! ;-)
New Contributor
Posts: 9
Registered: ‎09-01-2011
My Device: Blackberry Torch 9800
My Carrier: MTN

Re: Align to bottom of vertical field manager

HorizontalFieldManager hfm =
new HorizontalFieldManager(FIELD_BOTTOM|USE_ALL_HEIGHT);
hfm.add(new LabelField("status", FIELD_BOTTOM);


Well the above works like a charm, even tho its an old post I knw it wl b useful to someone
Posts: 44
Registered: ‎03-17-2012
My Device: Blackberry playbook
My Carrier: none

Re: Align to bottom of vertical field manager

The solution could be this:


public final class MyScreen extends MainScreen
     * Creates a new MyScreen object
    public MyScreen(){
            // Set the displayed title of the screen
            setTitle("Posicionamiento de elementos en la Screen");

            VerticalFieldManager containerManager = new VerticalFieldManager(Manager.USE_ALL_WIDTH | Manager.USE_ALL_HEIGHT);

            VerticalFieldManager vfm = new VerticalFieldManager();

            vfm.add(new LabelField ("Field 1"));
            vfm.add(new LabelField ("Field 2"));

            HorizontalFieldManager hfm = new HorizontalFieldManager(Manager.USE_ALL_HEIGHT | Manager.FIELD_HCENTER);

            hfm.add(new LabelField ("Field 3", Field.FIELD_BOTTOM));