vcl-dxspreadsheetconditionalformattingrules-33aa25ca.md
A Two Color Scale conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleTwoColorScale = class(
TdxSpreadSheetConditionalFormattingRuleCustomColorScale
)
A Two Color Scale conditional formatting rule marks cells with colors on a gradient based on two key point colors associated with low and high threshold values.
The list below outlines key members of the TdxSpreadSheetConditionalFormattingRuleTwoColorScale class. These members allow you to configure Two Color Scale rule settings.
AreasAllows you to manage the conditional formatting rule’s target areas.CloneCopies the rule between different sets of target areas.Index | StopIfTrueSpecify how the rule interacts with other conditional formatting rules applied to the same cells.
MinValue | MaxValueSpecify threshold values and corresponding colors.DefaultMinValueColor | DefaultMaxValueColorAllow you to change the default key gradient point colors.
AssignCopies compatible settings between conditional formatting rules.BeginUpdate | EndUpdateAllow you to avoid excessive redraw operations during batch rule setting changes.GetDetailsReturns the conditional formatting rule’s name displayed in the Conditional Formatting Rules Manager dialog.LoadFromStream | SaveToStreamAllow you to store conditional formatting rule settings in a stream.OwnerProvides access to the parent conditional formatting controller.
To create a Two Color Scale conditional formatting rule, you can call one of the overloaded Add procedures of the corresponding conditional formatting controller and pass a reference to the TdxSpreadSheetConditionalFormattingRuleTwoColorScale class as the ARuleClass parameter:
TcxDataControllerConditionalFormatting.AddCreates a new conditional formatting rule for a Data Grid, Tree List, or Vertical Grid control.TdxSpreadSheetConditionalFormatting.AddCreates a new conditional formatting rule in a spreadsheet document.
Alternatively, you can call the constructor of the TdxSpreadSheetConditionalFormattingRuleTwoColorScale class and pass the target conditional formatting controller as the AOwner parameter.
To delete an individual Two Color Scale conditional formatting rule, do one of the following:
delete keyword in C++Builder).Alternatively, you can call the TdxSpreadSheetCustomConditionalFormatting.Clear procedure to delete all rules in a conditional formatting controller.
You can also use the following threshold-based rules:
TdxSpreadSheetConditionalFormattingRuleDataBarA Data Bar conditional formatting rule.TdxSpreadSheetConditionalFormattingRuleIconSetAn Icon Set conditional formatting rule.TdxSpreadSheetConditionalFormattingRuleThreeColorScaleA Three Color Scale conditional formatting rule.
The TdxSpreadSheetCustomConditionalFormatting.Rules property references the TdxSpreadSheetConditionalFormattingRuleTwoColorScale class as a TdxSpreadSheetCustomConditionalFormattingRule object.
To access all public API members, you need to cast the returned object to the TdxSpreadSheetConditionalFormattingRuleTwoColorScale class. You can call the rule’s ClassType function to identify the actual rule type.
TObject TPersistent TInterfacedPersistent TcxInterfacedPersistent TdxSpreadSheetCustomConditionalFormattingRule TdxSpreadSheetConditionalFormattingCustomRule TdxSpreadSheetConditionalFormattingRuleCustomScale TdxSpreadSheetConditionalFormattingRuleCustomColorScale TdxSpreadSheetConditionalFormattingRuleTwoColorScale
See Also
TdxSpreadSheetConditionalFormattingRuleStyleBased Class
TdxSpreadSheetConditionalFormattingRuleTwoColorScale Members