Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Tabsheet with Panel Inside
Hello,
I want to disable tabsheet's scroling feature and have a scrolling panel as one of the contents of the tabsheets tab. So basicaly I want only part of the tab's content be scrollable. I add a panel to the the tab content as can be seen in the code. However, I get the tab scrolling instead of the panel. please help... :) Here is my code.
TabSeet tabs = new TabSheet();
tabs.setSizeFull();
tabs.addStyleName(ValoTheme.TABSHEET_FRAMED);
tabs.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
// Tab Content.
VerticalLayout layout = new VerticalLayout();
setSizeFull();
CssLayout actionBarLayout = new CssLayout();
Button bAddFile = new Button(FontAwesome.PLUS_SQUARE);
bAddFile.addStyleName(ValoTheme.BUTTON_BORDERLESS);
bAddFile.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
bAddFile.addStyleName(ValoTheme.BUTTON_PRIMARY);
bAddFile.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_TOP);
Button bDeleteFile = new Button(FontAwesome.TRASH);
bDeleteFile.addStyleName(ValoTheme.BUTTON_BORDERLESS);
bDeleteFile.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
bDeleteFile.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_TOP);
actionBarLayout.addComponents(bAddFile,bDeleteFile);
layout.addComponent(actionBarLayout);
Panel filesPanel = new Panel();
filesPanel.setSizeFull();
CssLayout filesContainer = new CssLayout();
filesContainer.setHeightUndefined();
Image image1 = new Image();
image1.setSource(new ExternalResource("https://cdn1.iconfinder.com/data/icons/ios-7-style-metro-ui-icons/512/MetroUI_Windows8_Photos.png"));
filesContainer.addComponent(image1);
Image image2 = new Image();
image2.setSource(new ExternalResource("https://cdn1.iconfinder.com/data/icons/ios-7-style-metro-ui-icons/512/MetroUI_Windows8_Photos.png"));
filesContainer.addComponent(image2);
Image image3 = new Image();
image3.setSource(new ExternalResource("https://cdn1.iconfinder.com/data/icons/ios-7-style-metro-ui-icons/512/MetroUI_Windows8_Photos.png"));
filesContainer.addComponent(image3);
Image image4 = new Image();
image4.setSource(new ExternalResource("https://cdn1.iconfinder.com/data/icons/ios-7-style-metro-ui-icons/512/MetroUI_Windows8_Photos.png"));
filesContainer.addComponent(image4);
Image image5 = new Image();
image5.setSource(new ExternalResource("https://cdn1.iconfinder.com/data/icons/ios-7-style-metro-ui-icons/512/MetroUI_Windows8_Photos.png"));
filesContainer.addComponent(image5);
Image image6 = new Image();
image6.setSource(new ExternalResource("https://cdn1.iconfinder.com/data/icons/ios-7-style-metro-ui-icons/512/MetroUI_Windows8_Photos.png"));
filesContainer.addComponent(image6);
filesPanel.setContent(filesContainer);
layout.addComponent(filesPanel);
//Add to tabsheet
tabSheet.addTab(layout,"Tab 1");
Last updated on
You cannot reply to this thread.