1. Add GridLayout
2. Add Sash
3. Add Tree (on the left)
4. Add Text (on the right)
Already have one error in generated code with an unused import:
- Code: Select all
import org.eclipse.swt.widgets.Composite;
(Have to remove the unused import to get it to compile)
Generated code now reads:
- Code: Select all
final Display display = new Display();
final Shell shell = new Shell();
shell.setLayout(new FillLayout());
shell.setText("My SWT Application");
{
final SashForm sashForm = new SashForm(shell, SWT.BORDER);
{
new Tree(sashForm, SWT.BORDER);
}
{
final Text text = new Text(sashForm, SWT.BORDER);
text.setText("text");
}
sashForm.setWeights(new int[] { 125, 360 });
}
// DESIGNER: Add controls before this line.
Running the app, terminating and going into Design view now gets error:
- Code: Select all
Can not create control without parent for ControlInfo
sashForm control is no-longer shown in the hierarchy of controls.