Skip to main content



      Home
Home » Eclipse Projects » GEF » Text, Icon Alignment in draw 2D label
Text, Icon Alignment in draw 2D label [message #66343] Mon, 24 February 2003 17:12 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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;
>
>
Previous Topic:Direct Editor CellEditor in GEF
Next Topic:Selection in GEF
Goto Forum:
  


Current Time: Wed Mar 12 17:00:28 EDT 2025

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

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

Back to the top