ITabCellStyle.BackgroundPicture

Syntax

BackgroundPicture: Integer;

Description

The BackgroundPicture property determines the index of background image of the table cell.

Comments

The image must be contained in collection of table icons defined in the ITabSheet.Images property.

Example

Executing the example requires that the repository contains a regular report with the REP_TABSHEET identifier. The file system should contain the image: C:\On.gif.

Sub Main;

Var

MB: IMetabase;

Rep: IPrxReport;

SheetT: IPrxTable;

Tab: ITabSheet;

TImg: ITabImages;

Back: Integer;

Style: ITabCellStyle;

Begin

MB := MetabaseClass.Active;

Rep := MB.ItemById("REP_TABSHEET").Edit As IPrxReport;

SheetT := Rep.Sheets.Item(0) As IPrxTable;

Tab := SheetT.TabSheet;

TImg := Tab.Images;

Back := TImg.Add(GxImage.FromFile("C:\On.gif"));

Style := Tab.Cell(0, 0).Style;

Style.EnablePictures := TriState.OnOption;

Style.BackgroundPicture := Back;

(Rep As IMetabaseObject).Save;

End Sub Main;

After executing the example a new icon corresponding to the image C:\On.gif is appointed as background image of the A0 cell.

See also:

ITabCellStyle