Tabris專家,Tabris:計劃支持CTabFolder嗎?
當前我想使用CTabFolder有能力關閉CTabItems。到目前爲止,Tababris不支持CTabFolder是否正確?
使用下面的代碼...
public class TabFolderExample extends Shell {
public TabFolderExample(Display display) {
super(display, SWT.NO_TRIM);
createContents();
}
private void createContents() {
setMaximized(true);
setLayout(new FillLayout(SWT.VERTICAL));
createTabFolder();
createCTabFolder();
}
private void createTabFolder() {
final TabFolder tabFolder = new TabFolder(this, SWT.NONE);
final TabItem tab0 = new TabItem(tabFolder, SWT.NONE);
tab0.setText("Tab0");
Text text0 = new Text(tabFolder, SWT.SINGLE | SWT.LEAD | SWT.BORDER);
text0.setText("Content Tab0");
tab0.setControl(text0);
final TabItem tab1 = new TabItem(tabFolder, SWT.NONE);
tab1.setText("Tab1");
Text text1 = new Text(tabFolder, SWT.SINGLE | SWT.LEAD | SWT.BORDER);
text1.setText("Content Tab1");
tab1.setControl(text1);
}
private void createCTabFolder() {
final CTabFolder tabFolder = new CTabFolder(this, SWT.NONE);
final CTabItem tab0 = new CTabItem(tabFolder, SWT.NONE);
tab0.setText("Tab0");
Text text0 = new Text(tabFolder, SWT.SINGLE | SWT.LEAD | SWT.BORDER);
text0.setText("Content Tab0");
tab0.setControl(text0);
final CTabItem tab1 = new CTabItem(tabFolder, SWT.NONE);
tab1.setText("Tab1");
Text text1 = new Text(tabFolder, SWT.SINGLE | SWT.LEAD | SWT.BORDER);
text1.setText("Content Tab1");
tab1.setControl(text1);
}
@Override
protected void checkSubclass() {
// Disable the check that prevents subclassing of SWT components
}
}
我得到this result on the iPad。底部的CTabFolder是空的。
你現在有什麼建議來解決這個問題?我正在考慮StackLayout和標籤?
此致敬禮。
我在這裏看到[鏈接](http://developer.eclipsesource.com/tabris/docs/client/supported-api/)CTabFolder和CTabItem在iOS上受支持。上面的代碼是否有錯誤? – baumato 2012-08-13 16:32:37