Grid Layout [message #52032] |
Wed, 25 March 2009 16:00 |
Katharina Brandl Messages: 14 Registered: July 2009 |
Junior Member |
|
|
Hi,
I'm implementing an Wizard Page extending the class WizardPage. In the
createControl method I have the following code:
public void createControl(Composite parent) {
Composite composite1 = createComposite(parent,2);
new Label(composite1,SWT.NULL).setText("class name:");
className = createTextField(composite1);
className.addModifyListener(new TextModifyListener());
textChanged();
Composite composite2 = createComposite(parent,1);
composite2.setVisible(true);
new EiffelContainerSelectionGroup(composite2,null);
setControl(parent);
}
the problem is: the second composite is not showing up inside the Wizard
Page - only the first one.
the createComposite method looks as follows:
private Composite createComposite(Composite parent, int columns){
Composite composite = new Composite(parent,SWT.NULL);
GridLayout layout = new GridLayout();
layout.numColumns = columns;
composite.setLayout(layout);
GridData data = new GridData();
data.horizontalAlignment=SWT.FILL;
data.grabExcessHorizontalSpace=true;
//data.verticalAlignment=SWT.FILL;
composite.setLayoutData(data);
return composite;
}
Does anyone know, where the problem is? I've tried to put the two
composites inside a top-level composite and with that both composites
appeared but the result didn't look like I expected it to do. Although I
specified only one column for the top Level composite, all widgets were on
the left side of the page...
Kind regards, Kathi
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05045 seconds