ITabFormatConditions.Item

Syntax

Item(Index: Integer): ITabFormatCondition;

Parameters

Index. Index of the conditional format, to which access is required.

Description

The Item property returns a link to the conditional format, the index of which is passed as the Index input parameter.

Example

Executing the example requires a form containing the Button component with the Button1 identifier, the TabSheetBoxNet component with the tabSheetBoxNet1 identifier and the UiErAnalyzer component with the uiErAnalyzer1 identifier. Specify the UiErAnalyzer1 data source for the TabSheetBox1 component.

The example is a handler of the OnClick event for the Button1 component.

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 on the basis of cells' values");
            
Case 1: Debug.WriteLine("Formatting of a cell with particular value");
            
Case 2: Debug.WriteLine("Formatting of cells with the greatest/least values");
            
Case 3: Debug.WriteLine("Formatting of cells with the values that are greater/less than average");
            
Case 4: Debug.WriteLine("Formatting of cells with unique/duplicate values");
            
Case 5: Debug.WriteLine("Formatting of cells satisfying the formula");
        
End Select;
    
End For;
End Sub Button1OnClick;

After you have executed this example and pressed 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:

ITabFormatConditions