Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does a negative color (-1, -2) mean in PowerBuilder?

The PowerBuilder documentation states that colors are encoded in a long number between -2 and 16777215.

I quite understand how RGB encodes colors in a long (b*256/256 + g*256 + r), what I don't understand is the meaning of a negative color: What would -1 and -2 mean? I couldn't find anything in the PB documentation that explains negative colors.

Thanks in advance

like image 942
Laurent Avatar asked Nov 14 '22 17:11

Laurent


1 Answers

Since we're talking about the backColor for a component, it really looks like a placeholder value to indicate that the control should inherit a color from its parent. That's a guess.

What I can say for certain is that it's not a system color or the "transparent" color:

67108864    ButtonFace
1073741824  WindowBackground
33554432    WindowText
268435456   ApplicationWorkspace
553648127   Transparent

Ultimately, though, I don't think anyone's ever going to hand you that color back from a method, and if you try to use the color for, e.g. drawing, you'd probably throw an error.

like image 63
Falkreon Avatar answered Jan 15 '23 06:01

Falkreon