[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Reduce spaces between composite
|
GridLayout has some fields that you can set for spacing. You probably want
something like yourGridLayout.verticalSpacing = 1.
Grant
"Rahul Yadav" <rahulyadav20@xxxxxxxxx> wrote in message
news:a4bf6cbe471afc53f12cb2a65557d9cd$1@xxxxxxxxxxxxxxxxxx
> Hi All,
> I have a composite with one column on which i add 3 more composites one
> under the other.i see gap between these composite that is much more then
> my requirement,can we reduce this gap??
>
> Composite composite = new Composite(parent, SWT.NONE);
> composite.setLayout(new GridLayout(1, false));
> composite.setBackground(new Color(parent.getDisplay(), 124, 124, 124));
>
> // First Composite
>
> Composite textComposite = new Composite(composite, SWT.FILL
> | SWT.SHADOW_OUT);
> textComposite.setLayout(new GridLayout(4, false));
> textComposite.setLayoutData(new GridData(0, SWT.TOP, false, false));
>
> // Second Composite
> Composite scopeComposite = new Composite(composite, 0);
> scopeComposite.setLayout(new GridLayout(3, true));
> scopeComposite.setLayoutData(new
> GridData(GridData.FILL_HORIZONTAL,SWT.TOP, false, false));
>
> // Third Composite
> Composite optionComposite = new Composite(composite, 0);
> optionComposite.setLayout(new GridLayout(2, true));
> optionComposite.setLayoutData(new
> GridData(GridData.FILL_HORIZONTAL,SWT.TOP, false, false));
>
>