Yes you can. Add your tabs.
tpanel.add(new SimplePanel(),"Tab 1");
tpanel.add(new SimplePanel(),"Tab 2");
tpanel.add(new SimplePanel(),"Tab 3");
tpanel.add(new SimplePanel(),"Tab 4");
Register your TabListener. And do something similar to this in you
listener.
onTabSelected(SourcesTabEvents sender, int tabIndex) {
SimplePanel sp = (SimplePanel) tpanel.getWidget(tabIndex);
if (sp.getWidget()==null) {
switch (tabIndex) {
case 0:
sp.setWidget(new HTML("This is Tab 1"));
break;
case 1:
....
}
}
}
On Dec 22, 9:58 am, jake H <[email protected]> wrote:
> Hello,
> I m creating a simple tabpanel with subpanels like the one follows
>
> TabPanel tpanel = new TabPanel();
> tpanel.add(new HTML("tbp"),"Basic");
> TabPanel subpanel = new TabPanel();
>
> subpanel.add(new HTML("aaa"),"Two");
> subpanel.add(new HTML("aaa"),"Three");
> subpanel.selectTab(0);
> tpanel.add(subpanel,"Basic");
> tpanel.add(new HTML("tbp"),"Basic");
>
> I want to ask if its possible with tabListeners , not to create the
> interface from the start but when the user press the One subpanel for
> example then it will load whatever it wants.
>
> Basic | Basic | Basic
> |
> One | Two | Three , by pressing One then load the stuff. I dont want
> to load them all from the beginning.
>
> Ty.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---