11-25-2011 10:19 AM
how to create appliaction get static menu on top static when scroll bar down???
for example
|| Menu 1 || Menu 2 | Menu 3 ||
Contain 1
Contain 2
etc...
when i move on contain in bottom, menu on top get move up... i want it get static when i move scroll down,,, any solution???
Solved! Go to Solution.
11-25-2011 10:26 AM
11-25-2011 10:39 AM - edited 11-25-2011 10:40 AM
Hi Jaff,
Solution means , you have to add managers like this.
First set NO_VERTICAL_SCROLL for the screen.
Suppose menu is a Horizontal manager add directly to screen like add(hfmMenu);
Now take two verticalFieldManagers vfm1,vfm2.
vfm1 = new VerticalFieldManager(VERTICAL_SCROLL);
vfm2 = new VerticalFieldManager(NO_VERTICAL_SCROLL);
vfm2.add(item1);
vfm2.add(item2);
..... etc
now
vfm1.add(vfm2);
add(vfm1);
so now you have two components on the screen
now override sublayout for screen and layout these two managers as your required widths and heights.
Thanks.
11-25-2011 10:45 AM
i think NO_VERTICAL_SCROLL just set for screen not move when scroll vertical... not for a component, i have just try that,,,but not working...any solution more???
11-25-2011 10:58 AM
i create menu on top with Manager Horizontal Field manager...
11-25-2011 12:02 PM
jaff, you can also try something like this
HorizontalFieldManager _hfmHeader = new HorizontalFieldManager(); _hfmHeader.add(Menu_1); _hfmHeader.add(Menu_2); ... _hfmHeader.add(Menu_N); this.setBanner(_hfmHeader);
11-25-2011 12:19 PM
Use banner or title area for the menu items - put them all in a HorizontalFieldManager and add that manager to your MainScreen as a banner.
More details here:
If you are not using MainScreen (which you might not want for one reason or another) use the approach recommended by simon_hain - a non-scrolling screen (or, more specifically, a screen with a non-scrolling VerticalFieldManager as delegate) with a HorizontalFieldManager with menu items on top and a scrolling VerticalFieldManager with the content under it.
11-25-2011 02:03 PM
andev, thats a great solution and simple...
setTitle (for 1st Top )
setBanner (for 2nd Top)
thanks,,,