1. mathews rutto
  2. PowerBuilder
  3. Wednesday, 12 July 2023 15:08 PM UTC

Good Day,

Below is the grid data window report. I need someone to help me color the column based on the data content. For example, under column trans type, where there is payment i color the entire row red, where there is invoice i color blue the entire row. How do I archive this?

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 12 July 2023 15:58 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi, Matthews -

In the DataWindow Painter, click on (select) the detail band:

Next, in the Background tab of the Properties pane, click on the Expression button on the right side of the Color property:

This opens the expression dialog window for the DataWindow.Detail.Color property. Enter an expression similar to what I show below:

Note: The name of the first column in the grid DataWindow I used was "company_name". 

I suggest you use lighter shades of Red and Blue so as to not wash out the black text. Black text on Blue background in particular is difficult to read. Of course, you can set the text color for each and every column in a similar manner when an invoice is being displayed. The choice is yours.

Best regards, John

Comment
  1. mathews rutto
  2. Thursday, 13 July 2023 09:35 AM UTC
Thank you, this has really helped me.
  1. Helpful
  1. Markus Eckert
  2. Thursday, 13 July 2023 13:43 PM UTC
Hi John

Do you have a good way to do this while staying "compatible" with themes? I found those hardcoded colors often only work well with the "default" color scheme and really clash with other themes.
  1. Helpful
  1. John Fauss
  2. Thursday, 13 July 2023 14:27 PM UTC
I do not have any suggestions to offer, Markus, as I've only experimented briefly with PB Themes. Our commercial app utilizes a well thought-out and consistent color schema and the way Themes are implemented does not support our needs.

You bring up an excellent question, however. One thing you may wish to consider is posing your question as a new thread in the Q&A forum. Good luck!
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from 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.