SetColorCellData Method

Description

Sets a color cell from assorted data.

Syntax

Ctlname.SetColorCellData (int nRow, int nCol, tagColorCells lpCellData)

Return Type

Boolean

Remarks

Use this method to set a color cell assorted data with tagColorCells structure, the structure parameter contains Color, Ramp Node type and Tooltip information, nRow and nCol must be smaller than ColorBoxDimension, or the method would return False.

See also tagColorCells structure.

Refer to other related methods with Color, Ramp node type and tooltip.

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

Dim colorcelldata As tagColorCells

colorcelldata.Color = RGB(255, 0, 0)

colorcelldata.RampNode = True

colorcelldata.Tooltip = “Red”

If ColorPicker1.SetColorCellData(3, 1, colorcelldata) then

ColorPicker1.GeneratePalette

End if