HotXLS-documentatie

AddCondFormatColorScale3 methode

Voegt een Excel 2007+ Color Scale-regel voor voorwaardelijke opmaak met 3 stops toe over een celbereik en retourneert de nieuwe TCondFormatRule. Cellen krijgen een gradiƫntvulling die interpoleert tussen drie kleurstops: min, midden (standaard op het 50e percentiel) en max. (Beschikbaar sinds v2.34.0)

Syntaxis

functie AddCondFormatColorScale3(const ARange: WideString;
  AMinColor, AMidColor, AMaxColor: LongWord;
  AMinKind: TXLSCfValueKind = cfvMinOfRange; const AMinValue: WideString = '';
  AMidKind: TXLSCfValueKind = cfvPercentile; const AMidValue: WideString = '50';
  AMaxKind: TXLSCfValueKind = cfvMaxOfRange; const AMaxValue: WideString = ''): TCondFormatRule;
ARange WideString. Sqref string, e.g. 'A1:A10'
AMinColor / AMidColor / AMaxColor LongWord. Three gradient anchor colors in Delphi BGR format
AMinKind / AMidKind / AMaxKind TXLSCfValueKind. Drempeltypes. Mid staat standaard op cfvPercentile / '50' — het klassieke Excel-voorstel "Red–Yellow–Green"
AMinValue / AMidValue / AMaxValue WideString. Threshold literal text. AMidValue defaults to '50' to pair with cfvPercentile

Voorbeeld

Dit voorbeeld kleurt A1:A10 met de klassieke rood-geel-groen-schaal

Sheet.AddCondFormatColorScale3('A1:A10',
  $000000FF, $0000FFFF, $0000FF00);

Zie ook