Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » resize font text when the label resize
resize font text when the label resize [message #518126] Wed, 03 March 2010 02:56 Go to next message
Eclipse UserFriend
Originally posted by: jedlicka.poll.cz

Hi,

How to resize Font when the widget (Button, label) is resizing? I
need to change Font (size text) in the label when the label is resizing.

Any example?

Thanks.

Martin
Re: resize font text when the label resize [message #518131 is a reply to message #518126] Wed, 03 March 2010 03:30 Go to previous message
Eclipse UserFriend
very bizzare requirement...

There is a class called FontMatric

Gc gc = new Gc(label);
Fontmatric fm = gc.getFontMatric();


this class is used to calculate the width of caracter according to font used...

Now using this you may try to calculate the font size for a label size...
Previous Topic:Marking points in Scroll bar
Next Topic:POPUP MENU
Goto Forum:
  


Current Time: Sat Jul 12 16:14:07 EDT 2025

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

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

Back to the top