TdxSpreadSheetConditionalFormattingRuleDuplicateValues Class
A “Duplicate Values“ conditional formatting rule.
Declaration
TdxSpreadSheetConditionalFormattingRuleDuplicateValues = class(
TdxSpreadSheetConditionalFormattingRuleStyleBased
)
Remarks
This rule applies custom formatting to all cells that contain duplicate values within one or more cell ranges affected by the rule. “Duplicate Values” is complementary to the “Unique Values“ conditional formatting rule.
The TdxSpreadSheetConditionalFormattingRuleDuplicateValues class provides the following members that allow you to:
Set or modify one or more cell ranges affected by the rule (Areas);
Specify the formatting settings applied to cells with duplicate values within the affected areas (Style);
Set the rule’s evaluation priority (Index);
Determine if the rule allows other rules with lower precedence to affect the same cells containing duplicate values (StopIfTrue);
Copy the rule between cells and/or cell ranges (Clone).
To create a “Duplicate Values” conditional formatting rule, you can:
Call a conditional formatting controller’s overloaded Add procedure (TdxSpreadSheetCustomConditionalFormatting.Add or TcxDataControllerConditionalFormatting.Add) and pass the rule’s class-reference (TdxSpreadSheetConditionalFormattingRuleDuplicateValues) as the ARuleClass parameter;
Call the Create constructor and pass the target conditional formatting controller as the AOwner parameter.
The conditional formatting controller’s Rules property provides indexed access to individual rules. To expose a “Duplicate Values” conditional formatting rule’s type-specific members, cast the rule to the TdxSpreadSheetConditionalFormattingRuleDuplicateValues class.