Hi Phillepe;
Yes, you can!
The approach would be to create your own "sub-themes" and name them ... as "Theme_xxxx.json. For example "theme-employee.json", "theme-Customer.json", etc. Then copy these theme files into the folder that is driving the main theme to be used. for example "Flat Blue Design".
In the sub-theme files, you can target each area of your application by object reference. For example:
{ "meta-info": { "version":"190" }, "wn_employee_main": { "drawing":false, "default-style":true, "normal-state": { "background-color":"#E6E6E6", "border-color":"#B3B3B3" }, "disabled-state": { "background-color":"#E6E6E6", "border-color":"#CCCCCC" } }, "uo_custom_object": { "drawing":false, "default-style":true, "normal-state": { "background-color":"#E6E6E6", "border-color":"#B3B3B3" }, "disabled-state": { "background-color":"#E6E6E6", "border-color":"#CCCCCC" } } } |
When you use the ApplyTheme() command, the PB run-time will automatically search for all Theme_xxx.json file variations. If it finds a reference to a window or control name (as in the example from above), the sub-theme feature will over-ride the main theme for your named Window or Control Class with its specific look & feel from the sub-theme json declaration. In essence, over-riding the main theme.
Note: The above theme feature override will only work in PB2019R2
HTH
Regards ... Chris
I have seen this technique work very well.
However, our application has more than 400 windows. I have to define a json file for each window, it is much too cumbersome to implement.
The idea may be to dynamically create the JSON file when the window is first opened compared to a reference file.
Suggestion: write a small PB utility to walk through a PBL and generate the appropriate "Theme_xxxx.json" file for each Window/Control sequence you require.
Regards ... Chris