Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT controls and larger font
SWT controls and larger font [message #490435] Thu, 08 October 2009 15:35 Go to next message
Peter Maas is currently offline Peter MaasFriend
Messages: 47
Registered: July 2009
Member
Hi,

if I select a larger font on a Windows desktop, Text controls can no
longer display the full height of their content. Can I make them scale
automatically with the configured font size? Thanks in advance for
your help.

Regards, Peter Maas.
Re: SWT controls and larger font [message #491253 is a reply to message #490435] Tue, 13 October 2009 19:35 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Peter, sorry for the late reply,

I assume you're referring to the following sequence of events:

- app is running with regular fonts, Text controls are sized accordingly
- while app is running user changes the font in the OS
- the fonts all grow but the Text controls are still at their original
height which is too small

Assuming this is your scenario, try adding an SWT.Settings listener to the
Display, it should be invoked by changes like this. You can then call
layout() to re-layout the controls (assuming the parent is using a layout)
and the new Text preferred sizes should be reflected.

If I have the wrong scenario or if this does not work then please follow up
here with some clarification.

Grant


"Peter Maas" <fritz.peter.maas@googlemail.com> wrote in message
news:hal0rl$dpt$1@build.eclipse.org...
> Hi,
>
> if I select a larger font on a Windows desktop, Text controls can no
> longer display the full height of their content. Can I make them scale
> automatically with the configured font size? Thanks in advance for
> your help.
>
> Regards, Peter Maas.
Re: SWT controls and larger font [message #491842 is a reply to message #491253] Fri, 16 October 2009 07:16 Go to previous message
Peter Maas is currently offline Peter MaasFriend
Messages: 47
Registered: July 2009
Member
Grant Gayed schrieb:
> Assuming this is your scenario, try adding an SWT.Settings listener to the
> Display, it should be invoked by changes like this. You can then call
> layout() to re-layout the controls (assuming the parent is using a layout)
> and the new Text preferred sizes should be reflected.

Grant,

thank you for your helpful advice.

Regards,

Peter Maas.
Previous Topic:zlinux - java.lang.UnsatisfiedLinkError: no swt-gtk-3555 or swt-gtk
Next Topic:Get which TreeItem has focus in a Tree ?
Goto Forum:
  


Current Time: Thu Apr 25 07:34:33 GMT 2024

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

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

Back to the top