我正在尝试为tabItem创建一些内容。我创建了创建每个选项卡的方法。例如:
private static void initSolutionsTab (TabFolder folder){
TabItem solutions = new TabItem(folder, SWT.NONE);
solutions.setText("Solutions");
Composite solutionTop = new Composite(folder, SWT.NONE);
ScrolledComposite topScroller = new ScrolledComposite(solutionTop, SWT.V_SCROLL);
//Should later hold many groups
Composite groupHolder = new Composite(topScroller,SWT.NONE);
Group solutionsGroup = new Group(groupHolder, SWT.BORDER_DOT);
Label solutionLabel = new Label(solutionsGroup, SWT.NONE);
solutionLabel.setText("TEST");
topScroller.setContent(groupHolder);
solutions.setControl(solutionTop);
}
但它只是在标签中显示一个空格。我知道,我缺少(或不理解)某些东西,但我没有发现错误。 有人可以给我一个提示吗?
答案 0 :(得分:0)
尝试为您的TabFolder使用setSize()