Skip to main content



      Home
Home » Eclipse Projects » GEF » How to left-justify labels stacked in a ToolbarLayout with setMatchingWidth(true)?
How to left-justify labels stacked in a ToolbarLayout with setMatchingWidth(true)? [message #41469] Tue, 12 November 2002 11:49 Go to next message
Eclipse UserFriend
Hello,

I have stacked several labels in a vertical Draw2d ToolbarLayout, having set
setMatchingWith(true),
but my problem is that the labels are all centered, while I need to have
these left-justified.

I have tried setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT) on the layout
object,

and setTextAlignment(PositionConstants.LEFT) on the labels, but it does not
work: my labels are still centered!

What could I try else?

Alex.
Re: How to left-justify labels stacked in a ToolbarLayout with setMatchingWidth(true)? [message #41499 is a reply to message #41469] Tue, 12 November 2002 14:50 Go to previous messageGo to next message
Eclipse UserFriend
Use setLabelAlignment(...) on your labels instead of setTextAlignment(...). The
text alignment is based on text placement (i.e. north, south, east, west) in
relation to the icon (if one exists). For instance, if the icon is larger than
the text and the text placement is south, you can align the text with the left
edge of the icon (or right, or centered). But what you want to do is align the
entire label to the left, so use setLabelAlignment(...).

Eric

"Alexandre Vermeerbergen" <ave@ds-fr.com> wrote in message
news:aqr9ed$1ev$1@rogue.oti.com...
> Hello,
>
> I have stacked several labels in a vertical Draw2d ToolbarLayout, having set
> setMatchingWith(true),
> but my problem is that the labels are all centered, while I need to have
> these left-justified.
>
> I have tried setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT) on the layout
> object,
>
> and setTextAlignment(PositionConstants.LEFT) on the labels, but it does not
> work: my labels are still centered!
>
> What could I try else?
>
> Alex.
>
>
>
>
Re: How to left-justify labels stacked in a ToolbarLayout with setMatchingWidth(true)? [message #41737 is a reply to message #41499] Wed, 13 November 2002 04:05 Go to previous message
Eclipse UserFriend
Eric:

Thank you very much for this answer, it works perfectly well!

Alex.
Previous Topic:Need help with Printing GEF figures
Next Topic:POLL: Simpler EditPolicies - Less is More
Goto Forum:
  


Current Time: Mon Nov 03 16:37:47 EST 2025

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

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

Back to the top