multi-line text editor for label editing [message #177769] |
Tue, 18 March 2008 01: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 #178218 is a reply to message #177958] |
Wed, 19 March 2008 16:18  |
Eclipse User |
|
|
|
Hi,
This seems odd. Check which DirectEditManager is being used when
editing the label, by putting a breakpoint in the label's editpart's
performDirectEdit() methods. If your editpart is a subclass to
TextCompartmentEditPart it should be using the TextDirectEditManager
which should show multi-line text.
Regards,
Cherie
ZYang wrote:
> 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.03700 seconds