1. Vlad V.
  2. PowerBuilder
  3. Thursday, 27 May 2021 10:42 AM UTC

Hi,

I'm having some difficulty finding the correct syntax to change the transparency property of the entire datawindow's band (detail band).

DW has no groups, just a standard grid datawindow listing excel-like rows.

If I do

dw_import.Modify("trade_date.transparency=50")

from powerscript, then only data column trade_date gets set the new rtansparency of 50 with no problems. However, there is twenty three data columns on the datawindow row (detail band), and I would like to set the entire row's, i.e. the whole detailed band, transparency to 50 and then 20 in two easy statements.

So I'm trying

dw_import.Modify("DataWindow.Detail.transparency=50")
dw_import.Modify("DataWindow.Detail.transparency=20")

No luck. Nothing happens. Also tried

dw_import.Modify("Detail.transparency=50")
dw_import.Modify("Detail.transparency=20")

and

dw_import.Modify("Detail.0.transparency=50")
dw_import.Modify("Detail.0.transparency=20")

and

dw_import.Modify("Detail.1.transparency=50")
dw_import.Modify("Detail.1.transparency=20")

 

Nothing. What am I missing?

 

Thanks

 

Accepted Answer
Ricardo Colarina Accepted Answer Pending Moderation
  1. Thursday, 27 May 2021 22:59 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Vlad,

Re "how to modify the transparency of ALL data columns on the datawindow at once", won't any of the two approaches do:

dw_import.Modify("col1.background.transparency=50 col2.background.transparency=50 col3.background.transparency=50")

or

Set all column background to transparent, then place a text control under the columns, which you then set the transparency using Modify.

Cheers,

Ricardo

 

Comment
  1. Vlad V.
  2. Friday, 28 May 2021 08:04 AM UTC
Oh, that works brilliantly. Thanks Ricardo <3
  1. Helpful
There are no comments made yet.
Matt Balent Accepted Answer Pending Moderation
  1. Thursday, 27 May 2021 12:45 PM UTC
  2. PowerBuilder
  3. # 1

You could try putting an expression on each column which looks for a common value (say a hidden column) and then set that column with a single modify (or setitem).

Comment
There are no comments made yet.
Matt Balent Accepted Answer Pending Moderation
  1. Thursday, 27 May 2021 12:07 PM UTC
  2. PowerBuilder
  3. # 2

I'm running 2019 R3 MR and used the following code to change the detail band:

ls = "Datawindow.Detail.Transparency = 50"
lsret = dw_dash.Modify(ls)

//worked

lsret = dw_dash.Modify("Datawindow.Detail.Transparency = 80")

//this worked too

One thing to check.  Do you have any expressions on the band and/or columns for the transparency property?

 

Comment
  1. Vlad V.
  2. Thursday, 27 May 2021 12:37 PM UTC
Thanks, but I figured out what I was doing wrong - the transparency of the *background* of the detail band's transparency is indeed modified, but I was not noticing this, because it's not what I wanted to do - I wanted to set each data column's text (data values) colour to slowly fade out, but there is more than 20 data columns. If I were to do each one's individually, it works but, it's rather slow, so I figured that setting it for the detail band would do it.



Is there a trick on how to modify the transparency of ALL data columns on the datawindow at once?
  1. Helpful
  1. Vlad V.
  2. Thursday, 27 May 2021 12:44 PM UTC
Aaaah, now in Appeon we can set transparency on a DW control, AWESOME! :-)



I still have to run all code through old PB 11.5 where this wasn't an option!
  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.