Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [Draw2D] How to strech label to "real" size of text?
[Draw2D] How to strech label to "real" size of text? [message #247186] Sun, 08 February 2009 11:55
Dénes Harmath is currently offline Dénes HarmathFriend
Messages: 157
Registered: July 2009
Senior Member
Hi all,
I would like to stretch a label's bounds to fit the minimum enclosing
bounds of its text. To clarify the problem: for example, a single "a"
character's bounds span the whole ascent and descent of the font (so that
even a "b" or "g" would fit in it), even though the character "a" does not
reach either the ascender or the descender line. How could this be solved?
I tried Label.getTextBounds(), Label.getBounds(),
TextUtilities.getTextExtents() but all return the wrong bounding box.
Thanks in advance
thSoft
Previous Topic:[Zest] Custom Figures on GraphViewer
Next Topic:[Announce] GEF 3.4.2 M200901141331 is available
Goto Forum:
  


Current Time: Tue Apr 23 09:19:42 GMT 2024

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

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

Back to the top