Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Wrap the text of a Label
Wrap the text of a Label [message #223360] Mon, 25 September 2006 11:17 Go to next message
Eclipse UserFriend
Originally posted by: siddharth.star.gmail.com

Hi,
How can i wrap the text of label. The label is part of a shape and a user
can directly edit it. After the user eneters the new value I would wish to
wrap the label to a set size (that of the parent figure). Currently it
wraps to the parent size and the end is displayed as "...". I want the
label to wrap into multiple lines so that the information contained in the
label is not replaced by ellipses.

Any and every help will be highly appreciated

Thanks,
Siddharth
Re: Wrap the text of a Label [message #223370 is a reply to message #223360] Mon, 25 September 2006 11:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tobias.brueggendick.prostep.com

I can't tell you how to do that but i can tell you where to look after it.
Look at the Label in the Logic Diagram Example, there the text adjust to the
size of the parent Label, so if you extend the size the text will also
extend and vice versa.

Greetings Tobias

"Siddharth" <siddharth.star@gmail.com> schrieb im Newsbeitrag
news:d5160cfc652238d8595a97f61f95ba54$1@www.eclipse.org...
> Hi,
> How can i wrap the text of label. The label is part of a shape and a user
> can directly edit it. After the user eneters the new value I would wish to
> wrap the label to a set size (that of the parent figure). Currently it
> wraps to the parent size and the end is displayed as "...". I want the
> label to wrap into multiple lines so that the information contained in the
> label is not replaced by ellipses.
>
> Any and every help will be highly appreciated
>
> Thanks,
> Siddharth
>
Re: Wrap the text of a Label [message #223446 is a reply to message #223370] Wed, 27 September 2006 07:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: siddharth.star.gmail.com

Thanks alot for your help Tobias.
Although I have been fairly successful in implementing such a feature what
I would further like to know, is in the example the extended direct edit
manager uses a style of "66" for its TextCellEditor. Its very obviously a
style but what would interest me would be the information on what are the
various styles avaialable and what are their respective functionalities.
Moreover, I was particularly impressed at finding that for multi line
editors there's a mechanism for MultiLineEditor wherein the user can press
Ctrl+Enter.Really Cool

Thanks,
Siddharth
Re: Wrap the text of a Label [message #223470 is a reply to message #223446] Wed, 27 September 2006 12:01 Go to previous message
Eclipse UserFriend
Originally posted by: siddharth.star.gmail.com

I seem to have runned into some more problems with it now so please help.

Please ignore the Q in my previous post, I figured that out.

The problem is when i edit my shape (Text Editor style being wrap) and say
i press enetr a few times to create a few line breaks and my ui looks like
following

First Line

Second Line

Third Line

The UI appears to be like above till i save it.After saving all these line
breaks introduced by press of enter key are replaced by spaces and the UI
now looks like the follwiwng:

First Line Second Line
ThirdLine

The representation of the text in my model xml has spaces between First
Line Second Line Third Line.

Is there any way i can preserve the UI even after saving the model.

Thanks in Advance for your help

~Siddharth
Previous Topic:ComboBox or anything similar in GEF?
Next Topic:Drag and drop + DragTracker
Goto Forum:
  


Current Time: Thu Dec 14 13:27:52 GMT 2017

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

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