multi-line text editor for label editing [message #177769] |
Tue, 18 March 2008 05:24 |
Eclipse User |
|
|
|
Originally posted by: zhihui_yang73.yahoo.com
Hi all,
i need an editpart which is similar as the one used for Note. For now, I
can get the Note shape using NoteFigure. I also use a WrappingLabel to
capture the description of the node. My node wraps the label according to
the size of the figure nicely. However, I can only edit the label content
in a single line text editor, which is not the same as the text editor
used by Note. Can anybody please tell me how I can use multi-line text
editor within my node as what Note does?
Thanks a lot!
|
|
|
Re: multi-line text editor for label editing [message #177935 is a reply to message #177769] |
Tue, 18 March 2008 17:35 |
Eclipse User |
|
|
|
Originally posted by: jan.koehnlein.web.de
Spot the WrapLabel in the figure of the edit part, and set
setTextWrap(true)
ZYang wrote:
> Hi all,
>
> i need an editpart which is similar as the one used for Note. For now, I
> can get the Note shape using NoteFigure. I also use a WrappingLabel to
> capture the description of the node. My node wraps the label according
> to the size of the figure nicely. However, I can only edit the label
> content in a single line text editor, which is not the same as the text
> editor used by Note. Can anybody please tell me how I can use multi-line
> text editor within my node as what Note does?
>
> Thanks a lot!
|
|
|
Re: multi-line text editor for label editing [message #177958 is a reply to message #177935] |
Tue, 18 March 2008 19:22 |
Eclipse User |
|
|
|
Originally posted by: zhihui_yang73.yahoo.com
Hey Jan,
I did set text wrap to true using setTextWrap(true). It wraps my label
nicely according to the size of my node. My problem is that when I try to
edit the label, instead of let me edit the label directly; it shows a
single line text editor on top of the label. I can only edit the content
of my label using that single line text editor. I can see the label
content changed accordingly under the text editor. Once I'm done with the
editing, and click somewhere in the diagram, the text editor will
disappear. It is very annoying and hard to edit when the content of the
label is long. Is there anywhere else I should change in order to edit the
wrapped label directly with a multi-line text editor?
BTW, I am using WrappingLabel with the latest GMF build 2.1M5
Thanks.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03355 seconds