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
Previous Topic:[Zest] Custom Figures on GraphViewer
Next Topic:Lollipop decorators on connections in Draw2D
Goto Forum:

Current Time: Sat Jun 23 14:33:09 GMT 2018

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

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

Back to the top