1

Here's my code:

public Form getMenuForm()
{
    if ( menuForm == null )
    {
        Form menuForm = new Form( "Tracking Main Menu" );
        menuForm.setLayout( new BoxLayout( BoxLayout.Y_AXIS ) );
        menuForm.setScrollable( true );
        menuForm.setScrollableY( true );
        menuForm.addComponent( this.getMenuList() );
        for(int i=0;i<30;i++)
        {
            Label lblTest = new Label("hello guys");
            menuForm.addComponent( lblTest );
        }
        menuForm.addCommand( new Command( "Exit" ) );
        menuForm.setTransitionOutAnimator( CommonTransitions.createSlide( CommonTransitions.SLIDE_HORIZONTAL, true,
            200 ) );
        menuForm.addCommandListener( this );
    }
    return menuForm;
}

 public List getMenuList()
{
    String[] menuItems = { "Find Person", "Person Registration", "Message", "Setting" };
    if ( menuList == null )
    {
        menuList = new List( menuItems );
        menuList.setListCellRenderer( new DefaultListCellRenderer( false ) );
        menuList.setSmoothScrolling( true );
        menuList.setFixedSelection( List.FIXED_NONE );
        menuList.addActionListener( this );
    }
    return menuList;
}

I only can select 4 options of list, and I CAN'T scroll down to see the bottom of screen. Do I miss something here, please help me...

2 Answers2

2

You need to set menuForm to scrollable false and let the list's scrollability take over. You have nested scrollables one in another and that produces a bad user experience.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
0

Maybe you need to do this:

menuList.setScroable(true);
neb1
  • 209
  • 1
  • 12