|
Re: Unable to vertically center a Label [message #454288 is a reply to message #454286] |
Tue, 19 April 2005 17:15 |
Emil Crumhorn Messages: 169 Registered: July 2009 |
Senior Member |
|
|
Centering a label vertically is not up to the label, but up to the space
that surrounds it. You need to position the label vertically in the
available space.
If you for example use a GridLayout where the height of the space is 100
pixels, and you set the GridData.VERTICAL_ALIGN_CENTER on the LayoutData the
label would be centered vertically in that 100 pixel space. Labels only take
up as much space as they need for the containing text, where you then put it
is up to you.
Emil
"Luis" <lcrespom@gmail.com> wrote in message
news:d43bus$j0p$1@news.eclipse.org...
> Hi, it's me again with another "unable to..." post ;-).
>
> I can center a Label horizontally by using the SWT.CENTER flag, but I
> can't
> center it vertically.
> Is there a way to do so? Or is it a missing feature?
>
> The project I am working at has very specific UI requirements... for
> example, they also want to change the color of the table columns, and as
> far
> as I know, this is not supported either (maybe it is not even supported by
> the native Windows APIs, who knows).
>
> Any help will be welcome.
>
> Regards,
> Luis.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04269 seconds