| How to left-justify labels stacked in a ToolbarLayout with setMatchingWidth(true)? [message #41469] |
Tue, 12 November 2002 11:49  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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.
>
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.08970 seconds