Text, Icon Alignment in draw 2D label [message #66343] |
Mon, 24 February 2003 17:12  |
Eclipse User |
|
|
|
Originally posted by: sy_cheung2.yahoo.com
Hi,
How can I align text and icon in draw 2d label, I call
label.setTextAlignment();
label.setIconAlignment()
with PositionConstants.LEFT), but the text and icon still use Center
alignment.
Thanks for any help.
protected IFigure createFigure() {
Label label = new Label();
label.setTextAlignment(PositionConstants.LEFT);
label.setIconAlignment(PositionConstants.LEFT);
return label;
|
|
|
Re: Text, Icon Alignment in draw 2D label [message #66390 is a reply to message #66343] |
Mon, 24 February 2003 18:06  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
If the text and icon are side-by-side, then you can only use vertical
settings with the methods you mentioned.
To align the "entire label", use setLabelAligment(int)
"Sam Cheung" <sy_cheung2@yahoo.com> wrote in message
news:b3e3n8$c3i$1@rogue.oti.com...
> Hi,
>
> How can I align text and icon in draw 2d label, I call
>
> label.setTextAlignment();
>
> label.setIconAlignment()
>
> with PositionConstants.LEFT), but the text and icon still use Center
> alignment.
>
> Thanks for any help.
>
>
>
> protected IFigure createFigure() {
>
> Label label = new Label();
>
> label.setTextAlignment(PositionConstants.LEFT);
>
> label.setIconAlignment(PositionConstants.LEFT);
>
> return label;
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02718 seconds