Skip to main content

TdxSpreadSheetConditionalFormattingRuleIconSet Class

An Icon Set conditional formatting rule.

Declaration

TdxSpreadSheetConditionalFormattingRuleIconSet = class(
    TdxSpreadSheetConditionalFormattingRuleCustomScale
)

Remarks

An Icon Set rule allows you to mark cell values with icons according to threshold values associated with the icons.

VCL Spreadsheet: An "Icon Set" Rule Example

Main API Members

The list below outlines key members of the TdxSpreadSheetConditionalFormattingRuleDataBar class. These members allow you to configure Data Bar rule settings.

Common Rule API Members

Areas
Allows you to manage the conditional formatting rule’s target areas.
Clone
Copies the rule between different sets of target areas.
Index | StopIfTrue
Specify how the rule interacts with other conditional formatting rules applied to the same cells.

Rule-Specific API Members

Order
Allows you to change icon order in the current icon preset.
PresetName
Allows you to switch between available icon presets.
StopCount
Specifies the number of threshold values.
Stops
Provides indexed access to individual threshold values and related settings.
ShowValue
Specifies if cell values are visible.

General-Purpose API Members

Assign
Copies compatible settings between conditional formatting rules.
BeginUpdate | EndUpdate
Allow you to avoid excessive redraw operations during batch rule setting changes.
GetDetails
Returns the conditional formatting rule’s name displayed in the Conditional Formatting Rules Manager dialog.
LoadFromStream | SaveToStream
Allow you to store conditional formatting rule settings in a stream.
Owner
Provides access to the parent conditional formatting controller.

Create an Icon Set Rule

To create an Icon Set conditional formatting rule, you can call one of the overloaded Add procedures of the corresponding conditional formatting controller and pass a reference to the TdxSpreadSheetConditionalFormattingRuleIconSet class as the ARuleClass parameter:

TcxDataControllerConditionalFormatting.Add
Creates a new conditional formatting rule for a Data Grid, Tree List, or Vertical Grid control.
TdxSpreadSheetConditionalFormatting.Add
Creates a new conditional formatting rule in a spreadsheet document.

Alternatively, you can call the constructor of the TdxSpreadSheetConditionalFormattingRuleIconSet class and pass the target conditional formatting controller as the AOwner parameter.

Delete a Conditional Formatting Rule

To delete an individual Icon Set conditional formatting rule, do one of the following:

Alternatively, you can call the TdxSpreadSheetCustomConditionalFormatting.Clear procedure to delete all rules in a conditional formatting controller.

Other Threshold-Based Conditional Formatting Rule Classes

You can also use the following threshold-based rules:

TdxSpreadSheetConditionalFormattingRuleDataBar
A Data Bar conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleThreeColorScale
A Three Color Scale conditional formatting rule.
TdxSpreadSheetConditionalFormattingRuleTwoColorScale
A Two Color Scale conditional formatting rule.

Indirect TdxSpreadSheetConditionalFormattingRuleIconSet Class References

The TdxSpreadSheetCustomConditionalFormatting.Rules property references the TdxSpreadSheetConditionalFormattingRuleIconSet class as a TdxSpreadSheetCustomConditionalFormattingRule object.

To access all public API members, you need to cast the returned object to the TdxSpreadSheetConditionalFormattingRuleIconSet class. You can call the rule’s ClassType function to identify the actual rule type.

See Also