HotXLS dokumentáció

AddCondFormatColorScale3 metódus

Egy Excel 2007+ 3 megállós Színskála feltételes formázási szabályt ad egy cellatartományra, és visszaadja az új TCondFormatRule objektumot. A cellák három színmegálló között interpoláló átmenetes kitöltést kapnak: minimum, közép (alapértelmezetten az 50. percentilisen) és maximum. (Elérhető v2.34.0 óta.)

Szintaxis

function 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 formátum
AMinKind / AMidKind / AMaxKind TXLSCfValueKind. Threshold types. Mid defaults to cfvPercentile / '50' — the classic "Red–Yellow–Green" Excel preset
AMinValue / AMidValue / AMaxValue WideString. Threshold literal text. AMidValue defaults to '50' to pair with cfvPercentile

Példa

Ez a példa az A1:A10 cellákat a klasszikus Piros-Sárga-Zöld skálával színezi

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

Lásd még