Deleted13
(Deleted User)
February 9, 2011, 11:13pm
1
Hi,
I’m trying to add several child windows into differents tabs. I tried many ways to do this but it didn’t work. This is my code:
Window mainWindow = new Window ();
setMainWindow(mainWindow);
TabSheet Tabs = new TabSheet();
mainWindow.addComponent(Tabs);
HorizontalLayout LayH1 = new HorizontalLayout();
Tabs.addTab(LayH1, "My 1st Tab", null);
HorizontalLayout LayH2 = new HorizontalLayout();
Tabs.addTab(LayH2, "My 2nd Tab", null);
// add the first child window to the 2nd tab:
final Window mychildwindow = new Window("Child Window # 1");
mychildwindow.setWidth("400px");
mychildwindow.setHeight("200px");
LayH2.addComponent(mychildwindow);
I would like something like this:
http://demo.vaadin.com/ReindeerTheme
, the tab “Window” has four child windows. How can I do that ?
Thank you very much for your help.
Ville2
(Ville Alasaari)
February 10, 2011, 9:13am
2
ReindeerTheme source
.
There’s listener (SelectedTabChangeListener) which adds child windows to main window, when the ‘Window’ tab is selected and removes windows when another tab is selected.
Deleted13
(Deleted User)
February 10, 2011, 6:31pm
3
Hi Ville,
Thank you very much for your help!
-Sebastian