Making Labels of Links Resizable and Multiline [message #553637] |
Wed, 18 August 2010 08:35 |
Eclipse User |
|
|
|
Originally posted by: arne.noyer.ostfalia.de
Hello all,
i have a Link with a label in my Editor. I am trying to let the label be
multi-lined and also resizable.
By inserting the code "fFifureXXXLabel.setTextWrap(true)" inside the
Method "createContents()" of the LinkEditPart i already achieved, that
the label wraps, when a new line begins.
Furthermore, i changed the EditPart of the Label to install a
"ResizableShapeLabelEditPolicy" for the PRIMARY_DRAG_ROLE. This results
in having the possibility to resize the label, but resizing of the label
doesn't work at all. When i try to resize the label, the only thing that
changes is the location.
I would like to have that the label wraps, when the width of the label
is smaller than the length of the line.
I don't have any problems like these when have a label inside a figure
like an Rectangle. Then the size of the label just depends on the size
of its container. But i really don't get how i can achieve to let a
label for a link be resizable, that is not inside a container.
Best regards,
Arne
|
|
|
|
Re: Making Labels of Links Resizable and Multiline [message #684409 is a reply to message #553637] |
Wed, 15 June 2011 14:24 |
Chris Messages: 97 Registered: July 2009 |
Member |
|
|
Hi Arne,
have you managed to resize your labels in the end? I seem to be having
the same problem...
Regards,
Chris
Am 18.08.2010 10:35, schrieb Arne Noyer:
> Hello all,
>
> i have a Link with a label in my Editor. I am trying to let the label be
> multi-lined and also resizable.
>
> By inserting the code "fFifureXXXLabel.setTextWrap(true)" inside the
> Method "createContents()" of the LinkEditPart i already achieved, that
> the label wraps, when a new line begins.
>
> Furthermore, i changed the EditPart of the Label to install a
> "ResizableShapeLabelEditPolicy" for the PRIMARY_DRAG_ROLE. This results
> in having the possibility to resize the label, but resizing of the label
> doesn't work at all. When i try to resize the label, the only thing that
> changes is the location.
>
> I would like to have that the label wraps, when the width of the label
> is smaller than the length of the line.
>
>
> I don't have any problems like these when have a label inside a figure
> like an Rectangle. Then the size of the label just depends on the size
> of its container. But i really don't get how i can achieve to let a
> label for a link be resizable, that is not inside a container.
>
>
> Best regards,
> Arne
|
|
|
Powered by
FUDForum. Page generated in 0.02924 seconds