Skip to main content

Access to UIManager themeProps.

3 replies [Last post]
majingazetto
Offline
Joined: 2010-02-22

Hi!

Can I to access to actual loaded themeProps Hastable?

I can set new theme props, add theme props... but no specific method to access to themeProps in UIManager class.

I need access to this hastable to extract values for my owns components. (Yes I can use setUIID but I want to access only a few values).

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07

The only way is to keep it before calling add/set.

I'm not sure what the use case is for doing that though?

majingazetto
Offline
Joined: 2010-02-22

Well. if you Adding / Setting themeProps you only have this "new" props.

I need access to all theme loaded props. Why? Because I only need to access to a few props of my new component added via ResourceEdit.

Example: Adding in a theme:

MyNewComponent.fgColor 0xff00ff

I need to access to this property only. Using setUIID component change all properties.

The solution is add a new method in a UIManager class.

public Hashtable getThemeProps()
{
return themeProps;
}

Of course. If I add this new properties in code and using addThemeProps I can save a copy of this Hashtable. But with this method I need copy this code to all my programs. And I can't change this values via ResourceEdit.

Message was edited by: majingazetto

vprise
Offline
Joined: 2003-11-07

We won't add this since the theme prop's are changing constantly in their structure and we don't want code to depend on that
Do you want to change a property or read it?
You can easily do this on the component level.

You can also modify using UIManager's getComponent*Style() then calling setComponentStyle().