Tabris-Experts,
目前我想使用 CTabFolder 来关闭 CTabItems。到目前为止,Tabris 不支持 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
}
}
我在iPad上得到这个结果。底部的 CTabFolder 为空。
您目前建议如何解决此问题?我在考虑StackLayout和Labels?
此致敬意。
在 iOS 的 Tabris 客户端上,CTabFolder 和 TabFolder (目前)是相同的。CTabFolder的"扩展功能"并不真正适用于iOS默认的Tab/TabFolder UI。因此,要关闭选项卡,您现在可能需要重新考虑您的用户工作流程。
我们将再次查看CTabFolder,看看我们是否可以像在iPad的Safari上实现选项卡一样实现它。但这肯定会在路线图上走得更远。