How to fill and center using GridData [message #98418] |
Tue, 15 July 2008 12:24  |
Eclipse User |
|
|
|
Hi,
I would like to center a composite and to fill it (i.e. to grab excess
space).
From my point of view, it should be defined like that :
new GridData(int,SWT.CENTER,boolean,true)
but the grab seems to do not work...
Apparently, the grab or fill (what's the difference ?) only works with
new GridData(int,SWT.FILL,boolean,true)
but the SWT.FILL aligns my composite in the top
new GridData(int,SWT.FILL|SWT.CENTER,boolean,true) doesn't work better...
Any ideas ?
Thanks !
Emmanuel
|
|
|
Re: How to fill and center using GridData [message #98496 is a reply to message #98418] |
Tue, 15 July 2008 13:05   |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Emmanuel,
not sure what you mean with "center a composite and to fill it".
Cheers,
Rüdiger
Emmanuel wrote:
> Hi,
>
> I would like to center a composite and to fill it (i.e. to grab excess
> space).
>
> From my point of view, it should be defined like that :
> new GridData(int,SWT.CENTER,boolean,true)
> but the grab seems to do not work...
> Apparently, the grab or fill (what's the difference ?) only works with
> new GridData(int,SWT.FILL,boolean,true)
> but the SWT.FILL aligns my composite in the top
>
> new GridData(int,SWT.FILL|SWT.CENTER,boolean,true) doesn't work better...
>
> Any ideas ?
>
> Thanks !
>
> Emmanuel
>
|
|
|
|
|
|
|
Re: How to fill and center using GridData [message #99391 is a reply to message #99361] |
Tue, 22 July 2008 09:59  |
Eclipse User |
|
|
|
Originally posted by: rsternberg.innoopract.com
Hi Emmanuel,
Emmanuel wrote:
> Any idea how I can center vertically the text in a Label ?
>
as far as I know, it is not possible to center the contents of a Label
vertically. Reducing the number of composites is surely a good idea. But
in this case, this seems to be the only way.
If you're looking for SWT tricks, you might get more answers on the SWT
newsgroup.
Best regards, Ralf
|
|
|
Powered by
FUDForum. Page generated in 0.03454 seconds