Reputation: 54074
I am trying to use a widget offered by Opal.
I am doing the following:
@PostConstruct
public void createControls(Composite parent){
System.out.println("PROP3");
parent.setLayout(new GridLayout(1, false));
Composite propertyContainer = new Composite(parent, SWT.NONE);
propertyContainer.setLayout(new GridLayout(1, false));
GridData gd = new GridData(GridData.FILL, GridData.FILL, true, true);
propertyContainer.setLayoutData(gd);
propertyTable = new PropertyTable(propertyContainer, SWT.NONE);
propertyTable.showButtons();
propertyTable.viewAsCategories();
propertyTable.addProperty(new PTProperty("id", "Identifier", "Description for identifier", "My id")).setCategory("General");
propertyTable.addProperty(new PTProperty("text", "Description", "Description for the description field", "blahblah...")).setCategory("General");
}
@Focus
private boolean setFocus(){
return true;
}
The code is associated with a Part
and it runs and have no problem with other widgets but the PropertyTable
is not displayed.
The code to create the PropertyTable
is from their tutorial.
What am I messing up here and the PropertyTable
is not being displayed?
Upvotes: 1
Views: 199
Reputation: 170733
You (usually) need to set layout data on any controls under a composite with a GridLayout
. TabFolder
s use their own layout which doesn't need any layout data.
Upvotes: 2