Custom alignment of SWT widgets inside Composite
I have create a Composite object as follows.
Composite comp = new Composite(parent, SWT.NONE);
GridLayout gl = new GridLayout();
gl.numColumns = 2;
gl.verticalSpacing = 15;
gl.horizontalSpacing = 10;
gl.marginWidth = 20;
I want to create 4 rows with one label and one text box. It worked fine for me.
Now in the last row I want to display a label, Text box and a Button.
The 4 rows were created with code something similar to given below.
// Create a label and text box for the host
Label myLabel = new Label(comp, SWT.NONE);
myText = new Text(comp, SWT.BORDER);
I tried by increasing numColumns of Grid Layout, which resulted in label of
next row appearing in current row. Can anyone suggest the solution please ?