IPrxSheetHeaderPart.ImageTransparentColor

Syntax

ImageTransparentColor: IGxColor;

Description

The ImageTransparentColor property determines the color to be made transparent in the image.

Example

To execute the example the repository must contain a regular report with the REPORT_PRX identifier. The file system must include a file named C:\Logo.gif.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Report: IPrxReport;

Header: IPrxSheetHeaderBase;

HeaderPart: IPrxSheetHeaderPart;

Img: IGxImage;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("REPORT_PRX").Edit;

Report := MObj As IPrxReport;

Header := Report.ActiveSheet.Header;

HeaderPart := Header.Center;

HeaderPart.Text := "&[Picture]";

Img := New GxImage.CreateFromFile("C:\Logo.gif");

HeaderPart.Image := Img;

HeaderPart.ImageHeight := 10;

HeaderPart.ImageWidth := 10;

HeaderPart.ImageTransparentColor := GxColor.FromName("Blue");

MObj.Save;

End Sub Main;

After executing the example the central part of the header displays image from the file C:\Logo.gif. If the image contains blue color, this color is transparent.

See also:

IPrxSheetHeaderPart