Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Use Size-As-Needed for layouting WrappingLabels instead of Grab-whole-width
Use Size-As-Needed for layouting WrappingLabels instead of Grab-whole-width [message #1239300] Mon, 03 February 2014 22:09
Erik Schondorff is currently offline Erik SchondorffFriend
Messages: 25
Registered: October 2013
Junior Member
Hi Community,

I'm getting crazy with the WrappingLabels and its layouting logic. Like the title it says, I need just the size (getPreferredSize) for the WrappingLabel as the text needs space. But the WrappingLabels grabs the whole width of the given hints.

Exists a nice solution to handle with this Problem?

Thanks for your help.

Erik


EDIT:

Found it out...
WrappingLabel.getPreferredSize(int wHint, int hHint) takes the whole width of given space.
WrappingLabel.getPreferredSize() takes just the needed width....

But I don't know, why...
Nice evening

[Updated on: Mon, 03 February 2014 22:21]

Report message to a moderator

Previous Topic:Customized NonResizableEditPolicy(Ex)
Next Topic:Disable actions in GMF editor
Goto Forum:
  


Current Time: Fri Apr 26 15:26:45 GMT 2024

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

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

Back to the top