Skip to main content

Create(TdxSpreadSheetCustomConditionalFormatting,TRect) Constructor

Creates a new conditional formatting rule in the specified conditional formatting controller.

Declaration

constructor Create(AOwner: TdxSpreadSheetCustomConditionalFormatting; const AArea: TRect); reintroduce; overload;

Parameters

Name Type Description
AOwner TdxSpreadSheetCustomConditionalFormatting

A conditional formatting controller.

AArea TRect

An area affected by the conditional formatting rule.

Remarks

Call this constructor to create a new conditional formatting rule in a conditional formatting controller passed as the AOwner parameter. Each descendant of the TdxSpreadSheetCustomConditionalFormattingRule class overrides the first overloaded Create constructor variant to initialize rule-specific properties.

The first overloaded variant assigns the specified controller as the newly created rule’s owner and creates an empty list of affected cell ranges. The second overloaded variant additionally accepts a cell range as the AArea parameter to set a single area affected by a newly created rule. The second overloaded Create constructor variant calls the first variant internally and appends the specified cell range to the Areas list.

Alternatively, you can call either of the conditional formatting controller’s overloaded Add procedure variants passing a class-reference to the required rule class as the ARuleClass parameter.

Note

To delete the rule, pass it as the ARule parameter of the conditional formatting controller’s Remove procedure.

See Also