1. Kevin Ridley
  2. PowerServer
  3. Thursday, 2 June 2022 14:58 PM UTC

I have a client using PS 2021 who uses yellow background in datawindows for required fields.  When using themes, the yellow background doesn't show up.  What are others using for this scenario to display a different background color?

Accepted Answer
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 8 June 2022 02:44 AM UTC
  2. PowerServer
  3. # Permalink

Hi Kevin,

Thanks for the further feedback. I can now reproduce the issue based on your description.
This issue happens when: the Modify function sets the same color value as the one defined in the DW Painter.
We noticed that you’ve submitted a bug to the Support system, we will handle it there.

Right now, you can change the column background color to expression to work it around, for example:

dw_1.modify("col_1.background.color ='65535~t65535'")

Regards,
Ken

Comment
  1. Kevin Ridley
  2. Wednesday, 8 June 2022 12:32 PM UTC
That works Ken, thank you!
  1. Helpful
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Monday, 6 June 2022 03:38 AM UTC
  2. PowerServer
  3. # 1

Hi Kevin,

Once DW uses a theme, uniform colors will be enabled. If you want to set some columns to other colors, you can do it in any of the ways below:
1. In DW Painter, open the column color property expression. Use the expression to set the color.
2. Use Modify function in code to change the column color.

This is because expressions and Modify have a higher priority than theme files. You can refer to this link for details:
https://docs.appeon.com/pb2019r3/pbug/ch02s01.html#d0e8467 


Regards,
Ken

Comment
  1. Olan Knight
  2. Monday, 6 June 2022 17:51 PM UTC
<Off the top of my head...>

The Modify needs to be:



dw_1.Object.<Columnname>.Background.Mode=0

dw_1.Object.<Columnname>.Background.Color=<numeric value for yellow>
  1. Helpful 1
  1. Ken Guo @Appeon
  2. Tuesday, 7 June 2022 06:08 AM UTC
Hi Kevin,



I didn’t reproduce the issue you described locally. I suggest you:

1. First, make sure this code can modify the column background color successfully when it’s not using Theme.

2. Then, Apply a Theme, and run this code to modify the column background color.

3. You can try to open the column background color property expression in dw painter, set the background color with the expression and see if it works.

4. As you are using PS 2021, I suggest you try the above in PB 2021 first to see if it works.

5. If the issue remains, please provide a small example case for us to analyze.



Regards,

Ken

  1. Helpful
  1. Kevin Ridley
  2. Tuesday, 7 June 2022 15:33 PM UTC
@Olan - the mode didn't help.

@Ken - interesting development. I changed the color to magenta and it worked (as did all other colors but yellow). The original background color saved in the dw painter is yellow (65535). I tried modifying another column that is normally white to yellow and that also worked. So it looks like the bug is trying to modify a themed dw back to the saved background color. I also tried modifying to white then immediately modifying to yellow and that didn't work.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.