1. Gregory Rusak
  2. PowerBuilder
  3. Tuesday, 12 April 2022 23:02 PM UTC

PowerBuilder 2021 Build 1288.

What is the Hex code to set the background-color of a statichyperlink to be transparent in the theme.json file?

"statichyperlink":
{
"drawing":true,
"border":0,
"background-transparent":true,
"normal-state":
{
"background-color":"#FFFFFF",
"text-font":{"color":"#0000FF"}
},
"disabled-state":
{
"background-color":"#FFFFFF",
"text-font":{"color":"#A0BEE6"}
}
}

Thanks in advance.

John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 13 April 2022 01:00 AM UTC
  2. PowerBuilder
  3. # 1

Hi, Gregory - 

A StaticHyperText control, like other window controls, does not support transparent background mode.

DataWindow Objects do support transparent background mode, but this is because the DataWindow Engine handles the rendering of the contents of a DataWindow control and this feature was included in its design.

Best regards, John

Comment
There are no comments made yet.
Gregory Rusak Accepted Answer Pending Moderation
  1. Wednesday, 13 April 2022 16:53 PM UTC
  2. PowerBuilder
  3. # 2

John,

I agree that controls on windows do not support transparent background mode, but the the controls do support backcolor = transparent as follows:

So if the backcolor can be set to transparent in the IDE, why can't the theme be used to set the same value at runtime?

Warm Regards,

Greg

Comment
  1. John Fauss
  2. Wednesday, 13 April 2022 17:18 PM UTC
It's likely due to the JSON convention of using only six hex digits to define an RGB value. The non-RGB, or "named" color value constants in PB are defined by including a non-zero hi-order byte in a (4-byte) unsigned long. For example, if you set the background color of a statichyperlink control to "Transparent" and leave the text color as "Link" - then edit the window's source and find the type definition for that control, you'll see that the text color is 134217856, or x80000080 and the back(ground) color is 553648127, or x02FFFFFF.
  1. Helpful 2
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.