Skip to main content
Table of Contents

TTMSFNCDataGridConditionalFormatting.AddValueHighlight Method

Adds a grtCellValue rule with the fill and font colour already applied.

API unit family: TMSFNCDataGridConditionalFormatting Declaring type: TTMSFNCDataGridConditionalFormatting

Syntax

FMX.TMSFNCDataGridConditionalFormatting.hppPascalC++
function AddValueHighlight(AColumn: Integer; AComparison: TTMSFNCDataGridFormatComparison; const AValue: string; AFillColor: TTMSFNCGraphicsColor; ATextColor: TTMSFNCGraphicsColor = gcNull): TTMSFNCDataGridFormatRuleItem;
TTMSFNCDataGridFormatRuleItem* __fastcall AddValueHighlight(int AColumn, TTMSFNCDataGridFormatComparison AComparison, const System::UnicodeString AValue, Fmx::Tmsfncgraphicstypes::TTMSFNCGraphicsColor AFillColor, Fmx::Tmsfncgraphicstypes::TTMSFNCGraphicsColor ATextColor = (System::Uitypes::TAlphaColor)(0x0));

Remarks

Equivalent to AddCellValueRule followed by TTMSFNCDataGridFormatRuleItem.Highlight.

Parameters

Name Description
AColumn Zero-based column index the rule applies to.
AComparison The comparison operator to use.
AValue The reference value compared against the cell value, as text.
AFillColor The solid background colour applied to a matching cell; pass gcNull to leave the fill unchanged.
ATextColor The text colour applied to a matching cell; pass gcNull (the default) to leave the font colour unchanged.

Returns

The newly added rule, owned by the collection.