SetColorCellColor Method

Description

Sets a color cell value and specifies the cell ramp node type.

Syntax

Ctlname.SetColorCellColor (int nRow, int nCol, OLE_COLOR nColor, Optional Bool bRampNode = False)

Return Type

Boolean

Remarks

Use this method to set specified nRow and nCol color cell color, and parameter bRampNode sets the specified color cell ramp node type, the default ramp node type is False.

nRow and nCol must be smaller than ColorBoxDimension, or the method would be failed.

After loaded a standard ramp palette file or when generated a ramp palette, the ColorCell(0,0) and ColorCell(x, y) ramp node type must be True. x, y determines by ColorBoxDimension.

This function also can implement through ColorBoxColors property, see also ColorBoxColors property.

Notes: Color cells tooltip texts will not synchronize automatically after its value is changed. All color cells tooltip texts need be modify manually if you hope it has meaning, refer to SetColorCellToolTip method.

Samples

' assume ColorBoxDimension is cc8x8

If ColorPicker1.SetColorCellColor(3, 1, RGB(233, 12, 221), True) then

ColorPicker1.GeneratePalette

End if