在选项卡 sheet 中为 vaadin 创建面板
Create panel in tab sheet for vaadin
我已经创建了选项卡 sheet。问题是我无法滚动页面,所以我只能看到页面的一半。所以我决定在选项卡内创建面板 sheet 但每次我插入面板源代码时它总是出错。
public PersonRegistration()
{
VerticalLayout tab = new VerticalLayout();
tab.setSizeFull();
TabSheet tabsheet = new TabSheet();
tabsheet.addStyleName("center-aligned-tabs");
addComponent(tabsheet);
VerticalLayout tab1 = new VerticalLayout();
tab1.addComponent(new PICConfirm());
tabsheet.addTab(tab1, "IC Confirmation",null);
VerticalLayout tab2 = new VerticalLayout();
tab2.addComponent(new PDemography());
tabsheet.addTab(tab2, "Demography",null);
VerticalLayout tab3 = new VerticalLayout();
tab3.addComponent(new PContact());
tabsheet.addTab(tab3, "Contact",null);
Panel panel = new Panel();
panel.setSizeFull();
panel.getContent().setSizeUndefined();
tab.addComponent(panel);
tab.setExpandRatio(panel, 1);
}
是否可以将面板放在选项卡内 sheet?
尝试简单地调用 setSizeFull(); // 如果你正在实现视图
在那个方法中,看看它是否有效。
我已经创建了选项卡 sheet。问题是我无法滚动页面,所以我只能看到页面的一半。所以我决定在选项卡内创建面板 sheet 但每次我插入面板源代码时它总是出错。
public PersonRegistration()
{
VerticalLayout tab = new VerticalLayout();
tab.setSizeFull();
TabSheet tabsheet = new TabSheet();
tabsheet.addStyleName("center-aligned-tabs");
addComponent(tabsheet);
VerticalLayout tab1 = new VerticalLayout();
tab1.addComponent(new PICConfirm());
tabsheet.addTab(tab1, "IC Confirmation",null);
VerticalLayout tab2 = new VerticalLayout();
tab2.addComponent(new PDemography());
tabsheet.addTab(tab2, "Demography",null);
VerticalLayout tab3 = new VerticalLayout();
tab3.addComponent(new PContact());
tabsheet.addTab(tab3, "Contact",null);
Panel panel = new Panel();
panel.setSizeFull();
panel.getContent().setSizeUndefined();
tab.addComponent(panel);
tab.setExpandRatio(panel, 1);
}
是否可以将面板放在选项卡内 sheet?
尝试简单地调用 setSizeFull(); // 如果你正在实现视图 在那个方法中,看看它是否有效。