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?
- You are here:
- Home
- Q&A
- Q&A
- PowerServer
- PS 2021 individual dw column background colors w themes
- Kevin Ridley
- PowerServer
- Thursday, 2 June 2022 14:58 PM UTC
- Wednesday, 8 June 2022 02:44 AM UTC
- PowerServer
- # 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
- Kevin Ridley
- Wednesday, 8 June 2022 12:32 PM UTC
-
Helpful Loading... Helpful 0
- Monday, 6 June 2022 03:38 AM UTC
- PowerServer
- # 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
- Olan Knight
- Monday, 6 June 2022 17:51 PM UTC
The Modify needs to be:
dw_1.Object.<Columnname>.Background.Mode=0
dw_1.Object.<Columnname>.Background.Color=<numeric value for yellow>
-
Helpful Loading... Helpful 1
- Ken Guo @Appeon
- Tuesday, 7 June 2022 06:08 AM UTC
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
-
Helpful Loading... Helpful 0
- Kevin Ridley
- Tuesday, 7 June 2022 15:33 PM UTC
@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.
-
Helpful Loading... Helpful 0
- Page :
- 1
However, you are not allowed to reply to this question.