String labelText, int numColumns, int marginWidth, int marginHeight )
{
Label label = toolkit.createLabel(parent, labelText);
label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
DecoratedField field = new DecoratedField(parent, SWT.WRAP, new IControlCreator() {
public Control createControl(Composite parent1, int controlStyle) {
Composite container = toolkit.createComposite(parent1, controlStyle);
return container;
}
});
Composite container = (Composite) field.getControl();
GridLayout layout = new GridLayout();
layout.numColumns = numColumns;
layout.marginWidth = marginWidth;
layout.marginHeight = marginHeight;
container.setLayout(layout);
toolkit.adapt(field.getLayoutControl(), false, false);
FormSection.fillIntoGridOrTableLayout (parent, label, field.getLayoutControl(), 0, 0);
return field;
} // createLabelAndGridLayoutDecoratedContainer