Have you tried setting the split position on the vertical split panel? mabogie wrote: > Your code is fine, it must be something else: > > http://imgur.com/Ngqnu.png > > On 22 jun, 18:43, Parvez Shah <[email protected]> wrote: > >> Hi, >> My Tree component is not showing up inside the Vertical split pane any >> suggestions on what I may be doing wrong. >> >> My component are laid out in this manner >> I have a top level component >> DockPanel >> inside dock panel i have a Horizontal split pane >> in my horizontal split pane the left component is Vertical split pane >> and in top of vertical split pane I have a tree component >> >> Now the issue is that Tree component is not showing up, if i keep it >> anywhere else it works fine.. >> >> The code is also attached for review >> >> public void onModuleLoad() { >> >> DockPanel mainPanel = new DockPanel(); >> mainPanel.setBorderWidth(1); >> mainPanel.setSize("100%", "100%"); >> mainPanel.setVerticalAlignment(HasAlignment.ALIGN_MIDDLE); >> mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_CENTER); >> Widget header = new Label("Header"); >> mainPanel.add(header, DockPanel.NORTH); >> mainPanel.setCellHeight(header, "30px"); >> Widget footer = new Label("Footer"); >> mainPanel.add(footer, DockPanel.SOUTH); >> mainPanel.setCellHeight(footer, "25px"); >> >> // Create a tree with a few items in it. >> TreeItem root = new TreeItem("root"); >> root.addItem("item0"); >> root.addItem("item1"); >> root.addItem("item2"); >> >> Tree t = new Tree(); >> t.addItem(root); >> >> VerticalSplitPanel vSplit = new VerticalSplitPanel(); >> >> // If i don't set this value the panel will not show up properly >> vSplit.setSize("100%", "100%"); >> >> //This IS THE PROBLEM COMPONENT >> vSplit.setTopWidget(t); >> >> vSplit.setBottomWidget(new HTML("Bottom")); >> >> HorizontalSplitPanel hSplit = new HorizontalSplitPanel(); >> >> hSplit.setSplitPosition("50%"); >> >> hSplit.setLeftWidget(vSplit); >> hSplit.setRightWidget(new HTML("right")); >> >> mainPanel.add(hSplit, DockPanel.CENTER); >> >> RootPanel.get().add(mainPanel); >> >> } >> > >
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
