NativeExcel suite v1.x

ColorIndex property

Returns or sets the color of the interior. The color is specified as an index value into the current color palette, or as one of the XlColorIndex constants. Read/write LongWord.

Syntax

property ColorIndex: LongWord;

Description

ColorIndex can be one of these XlColorIndex constants.
xlColorIndexAutomaticUse to specify the automatic fill
xlColorIndexNoneUse to specify no interior fill
The following illustration shows the color-index values in the default color palette.

Example

This example sets the color of the range A1:C10 interior to red.
Workbook.Worksheets[1].Range['A1', 'C10'].Interior.ColorIndex := 3;
Copyright © NikaSoft 2004-2012