Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Configuration based on widget attributes
Configuration based on widget attributes [message #915472] Mon, 17 September 2012 11:02 Go to next message
Thomas  Mäder is currently offline Thomas MäderFriend
Messages: 46
Registered: July 2009
Member
I'm trying to base the visual configuration of my NatTables on the default settings of the NatTable widget (in order to change according to platform and system settings). However, when I have to configure the registries, I typically don't have access to the NatTable widget.
Does anyone have any suggestions on how to work around this problem?
Re: Configuration based on widget attributes [message #915886 is a reply to message #915472] Tue, 18 September 2012 06:47 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi,

I'm not quite sure of what kind of configurations you talking about. Generally I would suggest to rely on style configurations based on default settings that can be retrieved by SWT itself, as it gets the values from the platform. So you don't have to know the NatTable.

Greez,
Dirk
Re: Configuration based on widget attributes [message #915947 is a reply to message #915886] Tue, 18 September 2012 09:17 Go to previous messageGo to next message
Thomas  Mäder is currently offline Thomas MäderFriend
Messages: 46
Registered: July 2009
Member
Yes, but there really is only one way to find out what the default font of a control is: you have to create the control and then ask it for it's font. What I do now is that I send a "ConfigureCommand" down the stack containing the NatTable instance. I was wondering if there are other, better ways.
Re: Configuration based on widget attributes [message #915960 is a reply to message #915947] Tue, 18 September 2012 09:54 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Ok, but NatTable extends Canvas, and does Canvas have a default font? And if it has one, is it different to the system font?. If you want to get the system font of the platform, I would go the following way:

Display.getDefault().getSystemFont();

Previous Topic:How to disable filter on some columns?
Next Topic:Scroll problem
Goto Forum:
  


Current Time: Thu Apr 25 15:47:51 GMT 2024

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

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

Back to the top