0
我已經創建了標籤紙。問題是我無法滾動頁面,所以我只能看到我的頁面的一半。所以我決定在選項卡中創建Panel,但每次插入Panel源代碼時都會出錯。在vaadin的標籤頁中創建面板
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);
}
可以將面板放在標籤頁內嗎?
它總是「錯誤」的意思是什麼? –
您正在調用panel.getContent()。setSizeundfined(),但從未在第一個位置設置組件。如果這不是問題,請添加確切的錯誤/痕跡/ ...你得到。 – cfrick
什麼是錯誤?是的,可以將面板放入標籤頁。 – kukis