Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » vertically align text in Label?
vertically align text in Label? [message #440286] Wed, 28 July 2004 04:06 Go to next message
Eclipse UserFriend
Originally posted by: smartin.arcis.com

Is there a way to vertically align text in a label? I tried
label.setAlignment(SWT.CENTER|SWT.VERTICAL), but this did not seem to work.

~S
Re: vertically align text in Label? [message #440293 is a reply to message #440286] Wed, 28 July 2004 16:45 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Nope. Believe it or not, Windows labels just don't do it. Even after all
these years, I still don't believe it and have to check the MSDN every time.
What you can do instead is vertically center the label yourself within a
composite. Might be time for a snippet ...

"Shea Martin" <smartin@arcis.com> wrote in message
news:ce78k1$422$1@eclipse.org...
> Is there a way to vertically align text in a label? I tried
> label.setAlignment(SWT.CENTER|SWT.VERTICAL), but this did not seem to
work.
>
> ~S
Re: vertically align text in Label? [message #440388 is a reply to message #440293] Thu, 29 July 2004 00:41 Go to previous message
Eclipse UserFriend
Originally posted by: smartin.arcis.com

Steve Northover wrote:
> Nope. Believe it or not, Windows labels just don't do it. Even after all
> these years, I still don't believe it and have to check the MSDN every time.
> What you can do instead is vertically center the label yourself within a
> composite. Might be time for a snippet ...
Wow. I started to learn MFC about a year ago. I got about1/4 into the
manuual and realized that MFC is pretty much everything an OO API should
not be. I have been spoiled by using Qt for the last 2 years on
Solaris. But I want to do this project on Windows, and I can't afford
the $1500USD for Qt. In qt you can vertically center labels.

Anyway thanks for reply, and the suggestion.

~S
>
> "Shea Martin" <smartin@arcis.com> wrote in message
> news:ce78k1$422$1@eclipse.org...
>
>>Is there a way to vertically align text in a label? I tried
>>label.setAlignment(SWT.CENTER|SWT.VERTICAL), but this did not seem to
>
> work.
>
>>~S
>
>
>
Previous Topic:SWTDesigner
Next Topic:WorkspaceModifyOperation and update UI
Goto Forum:
  


Current Time: Thu Sep 26 00:50:36 GMT 2024

Powered by FUDForum. Page generated in 0.03333 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top