ITabSheet.FormatConditions

Syntax

FormatConditions: ITabFormatConditions;

Description

The FormatConditions property returns the collection of conditional formats, applied to some table cell ranges.

Example

Executing the example requires a form with a button on it named Button1, the TabSheetBox component with the TabSheetBox1 name and a component which serves as the data source for TabSheetBox1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Tab: ITabSheet;

Format: ITabFormatCondition;

i: Integer;

Begin

Tab := TabSheetBox1.Source.GetTabSheet;

For i := 0 To Tab.FormatConditions.Count - 1 Do

Format := Tab.FormatConditions.Item(i);

Debug.Write("Range: " + Format.Range.Address + " Condition: ");

Select Case Format.Type As Integer

Case 0: Debug.WriteLine("Formatting based on cell values");

Case 1: Debug.WriteLine("Formatting a cell with the specified value");

Case 2: Debug.WriteLine("Formatting cells with the maximum/minimum values");

Case 3: Debug.WriteLine("Formatting cells with above-average/below-average values");

Case 4: Debug.WriteLine("Formatting cells with unique/duplicate values");

Case 5: Debug.WriteLine("Formatting cells meeting formula criteria");

End Select;

End For;

End Sub Button1OnClick;

After executing the example and clicking the button, the console displays a list containing the name of the cell range and the type of the conditional formatting applied to this table range.

See also:

ITabSheet