Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hi Team,
Suppose I have a full working application(consisting of popups too) with various types of widgets present in application and I want to change the color, font-style etc type styles in one go with some custom logic or usig PTC api then how it can be achieved.
Is it possible. If yes, then share the logic.
Thanks in advance.
Hi @ranjank,
Style Themes are what was implemented in ThingWorx to achieve such results. They will allow you to define some styles that will then apply to all Themeable Widgets within the mashup that implements the Style Theme. Themeable Widgets are marked like this in the Mashup Builder :
I tried with the Style Theme but it applies only to Themeable Widgets (as you mentioned).
But our application consists of other widgets like Autocomplete, Tree, Autorefresh , popup title etc and many other widgets where Style themes didn't apply.
What should be done to change the styles like font-family, color etc for those widgets so that it should look in regard with other Themeable widgets (as application should be consistent throughout in terms of look and feel also).
Please help.
Hi @ranjank
You can only change the style theme of the widgets which are themeable. In your use case, you can create a service which outputs the style theme you would like to apply(result type STYLETHEMENAME) which executes on button click. You can bind the output of the service to Style Theme property of either the mashup or widgets you would like to change. Then on button click the the new style theme should get applied.
Regards,
Sachin
The point is Style Theme gets applied to only Themeable widgets and not to others whether by service or manually.
All non-themeable widgets does dispay Style Theme applied on composer but it never gets applied at run-time.
Then how to make the entire application consistent with respect to UI/UX because any application may not necessary having only Themeable widgets on the mashups as these are only 29 widgets in actual number.
@ranjank ,
If you are using a Master mashup, you can put all of your css code in there and it should apply to all of the child mashups. Then if you want to change the look of the application, you can just change what custom class is bound to all of your widgets. I've used session variables to manage that in the past and it works pretty well.
-Nick