ITabFormatConditions.AddCollection

Syntax

AddCollection(Value: ITabFormatConditions; [Link: Boolean = False]);

Parameters

Value - the collection of conditional formats, which should be copied.

Link - an optional parameter, which determines, whether a link should exist between copied conditional formats and the format collection, to which the copying is performed. By default the property is set to False, and a link is not created. If the parameter is set to True , the copies of conditional formats will be linked to source formats. When parameters of some copied conditional format change, the parameters of the source format will also change.

Description

The AddCollection method adds a specified collection of conditional formats.

Example

Sub AddCollect;

Var

Rep: IPrxReport;

Sheet: ITabSheet;

Collect: ITabFormatConditions;

SelRange: ITabSelection;

Begin

Rep := PrxReport.ActiveReport;

Sheet := (Rep.ActiveSheet As IPrxTable).TabSheet;

Collect := New TabFormatConditions.Create;

Collect.AddCollection(Sheet.FormatConditions, True);

SelRange := Sheet.View.Selection;

SelRange.Range.FormatConditions.AddCollection(Collect, True);

End Sub AddCollect;

This example is a macro for a regular report. When the macro is executed, all the conditional formats contained in the current report sheet are set for the selected cell range.

See also:

ITabFormatConditions