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 06:55
Dénes Harmath is currently offline Dénes Harmath
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: Thu Aug 21 16:17:40 EDT 2014

Powered by FUDForum. Page generated in 0.01448 seconds