<κλάση header="doc-nav" aria-label="Πλοήγηση τεκμηρίωσης"> Τεκμηρίωση HotXLS <κλάση nav="doc-links"> Περιεχόμενα Αρχική Επισκόπηση IXLSWorkbook TCondFormat <κλάση div="nav topic-quick-nav" aria-label="Topic shortcuts"> Αρχική Περιεχόμενα Επισκόπηση

AddCondFormatColorScale2 μέθοδος

<κλάση div="indent"> <κλάση div="txt"> Adds an Excel 2007+ 2-stop Color Scale conditional formatting rule over a cell range, returning the new TCondFormatRule so the rule's DXF Style override can be refined before save. Cells receive a gradient fill that interpolates between AMinColor (at the min threshold) and AMaxColor (at the max threshold). (Available since v2.34.0.)

Σύνταξη

<κλάση div="indent"> <κλάση div="txt"> function AddCondFormatColorScale2(const ARange: WideString;
  AMinColor, AMaxColor: LongWord;
  AMinKind: TXLSCfValueKind = cfvMinOfRange; const AMinValue: WideString = '';
  AMaxKind: TXLSCfValueKind = cfvMaxOfRange; const AMaxValue: WideString = ''): TCondFormatRule; <κλάση table="synd"> <κλάση td="syni">ARange <κλάση td="synid">WideString. Sqref string, e.g. 'A1:A10' <κλάση td="syni">AMinColor / AMaxColor <κλάση td="synid">LongWord. Gradient endpoint colors in Delphi BGR format (R in the low byte) <κλάση td="syni">AMinKind / AMaxKind <κλάση td="synid">TXLSCfValueKind. Threshold types — see TXLSCfValueKind <κλάση td="syni">AMinValue / AMaxValue <κλάση td="synid">WideString. Threshold literal; ignored for kinds that auto-detect

Παράδειγμα

<κλάση div="indent"> <κλάση div="txt"> This example colors A1:A10 from white to green based on the range's min and max values
<κλάση pre="code"> Sheet.AddCondFormatColorScale2('A1:A10', $00FFFFFF, $0000FF00);

Δείτε επίσης

<κλάση div="indent"> <κλάση div="txt"> AddCondFormatDataBar
AddCondFormatColorScale3
AddCondFormatIconSet
TCondFormat / TCondFormatRule classes <κλάση footer="reference-footer">Copyright © 2010-2026 losLab Software