یک قانون قالببندی شرطی نوار داده Excel 2007+ را روی یک بازه سلول اضافه میکند و شیء قالببندی شرطی جدید را برمیگرداند
نحو
function AddCondFormatDataBar(
const ARange: WideString;
AColor: LongWord;
AMinKind:
TXLSCfValueKind = cfvMinOfRange;
const AMinValue: WideString = '';
AMaxKind:
TXLSCfValueKind = cfvMaxOfRange;
const AMaxValue: WideString = ''):
TCondFormatRule;
| ARange |
WideString. رشته Sqref، مانند 'A1:A10' یا 'B2:C20' |
| AColor |
LongWord. رنگ پرشدن نوار در قالب Delphi BGR (R در بایت پایین). برای پرشدن آبی از $00FF0000 و برای سبز از $0000FF00 استفاده کنید |
| AMinKind / AMaxKind |
TXLSCfValueKind. انواع آستانه: cfvNumber, cfvMinOfRange, cfvMaxOfRange, cfvPercent, cfvPercentile, cfvFormula, cfvAutoMin, cfvAutoMax. پیشفرضها min را به cfvMinOfRange و max را به cfvMaxOfRange نگاشت میکنند و با مرزهای پیشفرض «automatic» نوار Excel همخوان هستند |
| AMinValue / AMaxValue |
WideString. Threshold literal (numeric text for cfvNumber/cfvPercent/cfvPercentile, A1-محدوده or فرمول text for cfvFormula). Ignored for cfvMinOfRange / cfvMaxOfRange / cfvAutoMin / cfvAutoMax |
مثال
این مثال یک نوار داده آبی روی A1:A10 با استفاده از محدودههای پیشفرض حداقل/حداکثر اضافه میکند
Sheet.AddCondFormatDataBar('A1:A10', $00FF0000);
همچنین ببینید