Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07: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 08:30 Go to previous message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
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...


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Previous Topic:Marking points in Scroll bar
Next Topic:POPUP MENU
Goto Forum:
  


Current Time: Sat Dec 14 17:48:44 GMT 2024

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

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

Back to the top