TransparentColor Property
The color not to be drawn in the control's image.
Definition
Property "OLE.TransparentColor" as Option
Values
This property can be one of the following options
| Value | Description |
|---|---|
"Auto" | Uses the top left pixel to determine color to make transparent (Default) |
"None" | No transparency |
| Integer | The color to make transparent. Use RGB(r, g, b) to calculate this value |
Remarks
This property allows the developer to specify that a certain color in the control's image not be drawn. This allows bitmap images to appear as natural irregular shapes rather than as rectangles.
The easiest way to make a color transparent is to set this property to Auto. In so doing, the control will always use the image's top left pixel, the pixel located at coordinate (0, 0), to determine the transparent color. If you want a different color to be transparent, then pass an exact RGB color value. You can do this using OI's RGB function.
This property is ignored if the control's image was loaded from an .ico or .png file they already contain the transparent pixels.
Example
// make pure blue the transparent color
Set_Property(@Window:".OLE_PICTURE", "OLE.TransparentColor", RGB(0, 0, 255))