-
LWUIT Tabs creation
i have created LWUIT Tabs and added my LWUIT List to the Tabs and Displayed,but my Problem is,when i add number of List items to the Tab,those list items are displayed ,but when i scroll up my List,my Tab will also gets scrolled,how to fix my tab position? Here my Code:
tabs=new Tabs(Component.BOTTOM);
tabs.addTab("TopNews", myNewsList);
form1.addComponent(tabs);
form1.show();
the above tab will be displayed by default,how to display my second tab information when ,i click on Tab2?
-
Re: LWUIT Tabs creation
to stop tabs scrolling, set form.setScrollable(false);
and
to add more tabs, do following way:
[QUOTE]
tabs=new Tabs(Component.BOTTOM);
tabs.addTab("TopNews", myNewsList);
// create a second component like list
tabs.addTab("tab 2", aboveCreatedComponent);
//create third component
tabs.addTab("tab 3", aboveCreatedComponent);
form1.addComponent(tabs);
form1.show();
[/QUOTE]
see [url=https://projects.developer.nokia.com/LWUIT_for_Series_40/browser/Apps/LWUITDemo/src/com/sun/lwuit/uidemo/TabsDemo.java]LWUIT tabs demo[/url]
-
Re: LWUIT Tabs creation
hi bandarap,
if i do like this
form.setScrollable(false);
My complete list items are not scrolling on screen....?
-
Re: LWUIT Tabs creation
Hi pavanragi,
Try to add the list to a container with scrollableY(true). And then the container to the Tab.
-
Re: LWUIT Tabs creation
Here is the answer for this:
form1.setScrollable(false);
And ideally also:
form1.setLayout(new BorderLayout());
form1.addComponent(BorderLayout.CENTER, tabs);