From RAD Studio API Documentation
Jump to: navigation, search


property Transparent: Boolean read GetTransparent write SetTransparent;


__property bool Transparent = {read=GetTransparent, write=SetTransparent, nodefault};


Type Visibility Source Unit Parent
property public
Vcl.Graphics TGraphic


Indicates whether the image covers its rectangular area.

Use Transparent to specify that the graphic be drawn transparently. Some descendants of TGraphic such as TIcon and TMetafile are always transparent, so setting the property for those objects does not change their behavior. However, the TBitmap graphic's drawing is affected by this property. The TImage component sets this property to be the same as its Transparent property to achieve transparent painting.

When the Transparent property is set to True, you can either specify a color as the transparent color or you can use the default color, which is the pixel in the lower left. The specified color is not displayed in the graphic, which lets the background show through. This can be useful in layering and for non-rectangular graphics.

Code Examples