1. Mark Jones
  2. PowerBuilder
  3. Friday, 25 February 2022 15:23 PM UTC

We have a large mature application with hundreds of windows.   With this next release we are for the first time going to be applying themes but only partially.   We are using them for windows, menus, windows, tab objects, radiobuttons,checkboxes, scrollbars, dropdowns,treeviews and datawindow checkboxes, dropdowns  and radiobuttons.   

For datawindows, we were excited to be able to switch from the selectrow color to our own color rather than the standard windows color (blue) but the schemes are implemented on such an all or nothing basis!     So for the datawindow theme, if we remove a sub-section from within this particular theme section I would hope it would use the datawindow settings and ignore the theme but instead it seems to use a theme default.   

So for example if we choose a selected-row-background-color then although we do not specify it the datawindow header color in the theme it will also change this to some theme default...

I have tried putting a "drawing":false within the sub-section or completely removing the sub-section but that does not help.

"head-band":
{ "drawing":false,
"background-color":"#00FF00",
"dwo-text-font":{"color":"#FFFFFF"}
},

Here is a theme section for grid style datawindows:

We have removed the head-band section so we would like it to use the datawindow header color but instead it switches the header to white.

"datawindow":
{ ...

"grid-style":
{
"drawing":true,

"detail-band":
{
"selected-row-text-color":"#000000",
"selected-row-background-color":"#CDE8FF",
"unselected-row-background-color":"#FFFFFF"
},


"grid-line":
{
"horizontal-line":true,
"vertical-line":true,
"line-color":"#E8EFF8"
}}}

Am I missing something regarding partial implemenation of themes when coloring datawindows?  Does anyone know a trick for this?   We have our own code to manage the header and detail band colors however we would really like to use our own color for the selected row (we know we can set this as a windows property but that would affect our user's computers for other applications).

One more interesting point regarding the detail band which seems to behave differently - if we put a detail band background color expression on the datawindow (with the above theme) that works even though we are specifying the "unselected-row-background-color" in the theme.   So our detail band color expression will win unless the row is selected and then it uses the theme color.  Curious!

 Mark

  



There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.