Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Resizing labels
Resizing labels [message #233425] Tue, 24 April 2007 15:44 Go to next message
Andy Evans is currently offline Andy EvansFriend
Messages: 61
Registered: July 2009
Member
Hello,

I want to be able to create an external label that can be resized, i.e. I
can drag
its bounding box and the text will wrap within it. However, I can't seem to
find
a way to do this. I've tried calling setTextWrap(true) (see below), but no
luck.
Has anyone managed to do this?

Thanks,

Andy

public class ElementNameFigure extends WrapLabel {

/**

* @generated

*/

public ElementNameFigure() {

this.setText("<...>");

this.setTextWrap(true);

}


}
Re: Resizing labels [message #233441 is a reply to message #233425] Tue, 24 April 2007 17:02 Go to previous message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi,

I think you need an editpart for your label to accomplish what you're
asking. Resizing is triggered first by the resize handles and resize drag
tracker installed on them and second by a resize edit policy installed on
your label edit part that will create a command for the request created by
the resize drag tracker.
Hope this helps.

Cheers,
Alex
Previous Topic:GEF Update site
Next Topic:Resize only in north and south directions
Goto Forum:
  


Current Time: Tue Apr 16 17:40:28 GMT 2024

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

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

Back to the top