Dear eclipse community,
I would like to create a three-part form without using the multipage editor facilities that the forms UI provides. An editor is not really the applicable thing for my use case for various reasons.
Consequently, I tried to emulate the look and feel of a multipage editor by using a normal view with a CTabFolder inside. To this CTabFolder, I added three CTabItems, to each of which I would like to add a different form. Is it possible? If yes, what is the mistake I am currently making? This is the (slightly abbreviated) code I am using:
createPartControl of the View:
public void createPartControl(Composite parent) {
// Create the tabs
tabFolder = new CTabFolder(parent, SWT.LEFT|SWT.BOTTOM);
tabFolder.setBorderVisible(true);
tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
Display display = parent.getShell().getDisplay();
CTabItem overviewTabItem = new CTabItem(tabFolder, SWT.NONE, 0);
overviewTabItem.setText("Mistmach Overview");
overviewTabItem.setToolTipText("Select a Mismatch and get overview " +
"information.");
overviewTabItem.setControl(this.getOverviewForm(tabFolder));
CTabItem reasonsTabItem = new CTabItem(tabFolder, SWT.NONE, 1);
reasonsTabItem.setText("Reasons");
reasonsTabItem.setToolTipText("Get and edit information of the " +
"reasons for an mismatch.");
...
getOverviewForm:
private Control getOverviewForm(Composite parent) {
Composite formsComposite = new Composite(parent, SWT.NONE);
this.formToolkit = new FormToolkit(parent.getDisplay());
this.overviewForm = this.formToolkit.createScrolledForm(formsComposite);
overviewForm.setText("Mismatch Overview");
ColumnLayout layout = new ColumnLayout();
overviewForm.getBody().setLayout(layout);
// create "Mismatch" Section
Section sectionMismatch = formToolkit.createSection(overviewForm.getBody(),
Section.DESCRIPTION|Section.TITLE_BAR|
Section.TWISTIE|Section.EXPANDED);
ColumnLayoutData cd = new ColumnLayoutData();
sectionMismatch.setLayoutData(cd);
...
However, based on this code, the content of the composite (the overviewForm) is not displayed. There seems to be no error/exception popping up, so I am a bit lost.
Thanks for any hints (also for pointers to alternative solutions of using multiple form pages without using an editor),
Thorsten