I've been able to successfully insert a horizontal panel that also
contains a vertical panel as a tab. I used composition to create my
split panel and added that to the tab panel.

For example:
DecoratedTabPanel tabPanel = new DecoratedTabPanel();

...

class MyTab extends Composite {
  private final HorizontalSplitPanel container;
  private final VerticalSplitPanel tabPanel;

  public MyTab(){
    container = new HorizontalSplitPanel();
    initWidget(container);

    tabPanel = new VerticalSplitPanel();
    container.setLeftWidget(tabPanel);
    ...
   // set size to 100%, set split position, etc...
    ...
  }

  ...
  public DecoratedTabPanel getTabPanel(){
    return container;
  }

  ...
}

....
tabPanel.getTabPanel().insert(myTab, "My Tab", 0);


I've also noticed that whatever tab is selected upon loading looks
fine, but any other tab's content doesn't seem to show up properly.
I'm not sure why this is, I've never really researched it, but I've
found the following method helpful to ensure proper layout when called
in onModuleLoad().

        public static void cycleTabs(TabPanel tabPanel){
                if(tabPanel == null) { return; }
                int tabCount = tabPanel.getTabBar().getTabCount();
                for(int i=tabCount; i>0; i--){
                        tabPanel.selectTab(i-1);
                }
        }

Let me know if this helped.

On Oct 29, 12:58 pm, Ian Bambury <ianbamb...@gmail.com> wrote:
> You can't put a split panel inside a tab panel - it doesn't work, as you
> have discovered.
>
> You also can't use them in disclosure panels, stack panels and other things.
> The general rule is that any widget with 'moving parts' won't work inside
> another widget with 'moving parts' as far as I can tell.
>
> It's been like this since version 1.5 and although reported informally and
> formally, and accepted as a bug by Google, nothing has been done about it
> (at least, not up to 2.0m2)
>
> The issue is reported 
> herehttp://code.google.com/p/google-web-toolkit/issues/detail?id=3433&can=4
>
> If you want that functionality, then you'll have to create your own tab
> panel
> <http://code.google.com/p/google-web-toolkit/issues/detail?id=3433&can=4>
> Ian
>
> http://examples.roughian.com
>
> 2009/10/29 MarcoGT <marc...@gmail.com>
>
>
>
> > Hi all,
>
> > in my GWT application I have a TabPanel attached to the RootPanel;
> > in the first Tab I would like to insert a VerticalSplitPanel but it
> > does not work;
> > VerticalSplitPanel only works if attached to RootPanel.
>
> > Where am I wrong?
>
> > Here below code snippet.
>
> > TabPanel tabPanel = new TabPanel();
> > tabPanel.setSize("100%", "10%");
> > tabPanel.setAnimationEnabled(true);
> > tabPanel.setTitle("Gestione Palestra");
>
> > tabPanel.add(new Iscritti(), "Gestione Iscritti");
> > tabPanel.add(new Calendar(), "Gestione Presenze");
> > tabPanel.add(new Pay(), "Gestione Pagamenti");
>
> > rootPanel.add(tabPanel);
>
> > Then, here below code for the first tab:
>
> > VerticalSplitPanel vsplit = new VerticalSplitPanel();
>
> > vsplit.setTopWidget(new Label("Hello 1")));
> > vsplit.setBottomWidget(new Label("Hello 2")));
>
> > initWidget(vsplit);
>
> > Thanks
> > Marco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to