开发者

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

The PowerBuilder documentation states that colors are encoded in a long number betw开发者_StackOverfloween -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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜