Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Default Font Size
Default Font Size [message #548305] Wed, 21 July 2010 12:39 Go to next message
Adrian Abraham is currently offline Adrian AbrahamFriend
Messages: 4
Registered: July 2010
Junior Member
I need a way to shrink all of the text in my application. I've tried the following code in pre/postWindowCreate in the ApplicationWorkbenchAdvisor:

FontRegistry registry = JFaceResources.getFontRegistry();
for(String key : (Set<String>)registry.getKeySet()) {
  registry.put(key, registry.getDescriptor(key).setHeight(4).getFontData()); // Really small for testing
}


Unfortunately, the only thing that changes is the FormToolkit headers. All the other labels, text fields, lists, etc. are the same.

How can I globally shrink my fonts?
Re: Default Font Size [message #548559 is a reply to message #548305] Thu, 22 July 2010 11:07 Go to previous message
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 129
Registered: July 2009
Senior Member
Either you wait on e4 where i think you can define your font in a css file, or you could implement something like A GUI Factory, which creates all controls and adds a listener to them, when the font is changed then, the font can be set
control.setFont(...);
Previous Topic:Excel integration / dirty state
Next Topic:Problems with Decorator
Goto Forum:
  


Current Time: Sun Nov 28 15:51:09 GMT 2021

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

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

Back to the top