1. Larry Peters
  2. PowerBuilder
  3. Thursday, 14 May 2020 02:33 AM UTC

Hi,

This has to do with datawindows. I'm currently using PB17R3 but I don't believe the problem is limited to this release.

I'm attempting to dynamically control the background color of columns based on relative values within the datawindow. Sometimes it works fine but sometimes the background is black. (I never want black).

On researching this I found that background.mode plays a part. As I understand it from the PB Help, if background.mode = 0 then the column is opaque and whatever background.color is specified will be apparent; if background.mode = 1 then the column is transparent and the background.color is ignored and the visible color will be the datawindow background color(?).

However, I have found many example of code where background.mode = 2 and there is no documentation which explains this.

I have not yet resolved the black background and I'm looking for clarification on the background.mode issue.

TIA

Larry Peters

 

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 14 May 2020 11:16 AM UTC
  2. PowerBuilder
  3. # Permalink

John Fauss reported this last December:
https://www.appeon.com/standardsupport/search/view?id=3818

2 is "partially transparent", so I guess it would consider the settings (sliders) for transparency attributes.

regards

Comment
There are no comments made yet.
Larry Peters Accepted Answer Pending Moderation
  1. Thursday, 14 May 2020 19:44 PM UTC
  2. PowerBuilder
  3. # 1

Thanks Miguel, That explains Background.Mode=2.

Now if only I could learn how to get rid of my black background...

Comment
  1. Miguel Leeuwe
  2. Thursday, 14 May 2020 20:47 PM UTC
I agree with John for the need of more information.

Is it possible for you to re-create the issue in a small external datawindow and post it here with some code?

regards
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 14 May 2020 20:51 PM UTC
This is a very vague memory, but I seem to remember that in the past I had problems doing similar stuff. What seemed to be important, was the "order" in which you would do the modifies.

Play with setting the mode first or last before / after doing other modifies. (don't shoot me if that's BS).

Also make sure the column is not "protected" while doing your test (just in case).
  1. Helpful
  1. Olan Knight
  2. Thursday, 14 May 2020 23:49 PM UTC
Yes. You must set the MODE first before you can modify any other background color atttribute.



From memory, and this was a long, LONG time ago, I seem to recall that I set mode = 0, then backcolor = <numeric value>, and that worked every time.
  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.