Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Reduce spaces between composite
Reduce spaces between composite [message #484751] |
Wed, 09 September 2009 06:46 |
Rahul Yadav Messages: 65 Registered: July 2009 |
Member |
|
|
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));
|
|
|
Re: Reduce spaces between composite [message #484850 is a reply to message #484751] |
Wed, 09 September 2009 13:44 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
GridLayout has some fields that you can set for spacing. You probably want
something like yourGridLayout.verticalSpacing = 1.
Grant
"Rahul Yadav" <rahulyadav20@gmail.com> wrote in message
news:a4bf6cbe471afc53f12cb2a65557d9cd$1@www.eclipse.org...
> 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));
>
>
|
|
| | |
Goto Forum:
Current Time: Sat Apr 20 02:37:13 GMT 2024
Powered by FUDForum. Page generated in 0.03125 seconds
|