IPrxTableIslandLayoutCell.Format

Syntax

Format: IPrxTableIslandFormat;

Description

The Format property determines formatting parameters for a layout row cell.

Example

The following example assumes that there is the Report object with the IPrxReport type.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Report: IPrxReport;
    TabIs: IPrxTableIslands;
    TI: IPrxTableIsland;
    Layout: IPrxTableIslandLayout;
    Row: IPrxTableIslandLayoutRow;
    Cell: IPrxTableIslandLayoutCell;
    LayFormat: IPrxTableIslandFormat;
    Format: IPrxFormatConditions;
    TabFormat: ITabFormatCondition;
    ValFormat: ITabFormatValues;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("REPORT").Edit;
    Report := MObj As IPrxReport;
    TabIs := Report.TableIslands;
    TI := TabIs.Item(0);
    TI := TI.Edit;
    Layout := TI.Layout;
    Row := Layout.Rows(0);
    Cell := Row.Cells(0);
    LayFormat := Cell.Format;
    Format := LayFormat.Conditions;
    TabFormat := Format.Add;
    TabFormat.Type := TabConditionType.Values;
    ValFormat := TabFormat.Details As ITabFormatValues;
    //two-color gradient for cell formatting
    ValFormat.Style := TabFormatValuesStyle.TwoColorScale;
    //Set up minimum value
    ValFormat.MinValueType := TabFormatValueType.Lowest;
    ValFormat.MinValueColor := GxColor.FromName("Red");
    //set up maximum value
    ValFormat.MaxValueType := TabFormatValueType.Highest;
    ValFormat.MaxValueColor := GxColor.FromName("Blue");
    TI.Save;
    MObj.Save;
End Sub UserProc;

After executing the example the following conditional formatting is set for the selected layout cell of the relational area: formatting style - two color gradient.

See also:

IPrxTableIslandLayoutCell