Skip to content

AddImage - cCJGrid

Adds an icon, bitmap or cursor to the grid's image list

Type: Function
Return Data Type: Integer

Parameters

Parameter Type Description
sImage String The image filename being added. It can be a fully-qualified name or the name of a file that can be found in the program's Workspace.
iId Integer Is the index of the image in the image list. Pass 0 to have an index ID assigned.

Syntax

Function AddImage String sImage Integer iId Returns Integer

Call Example

Get AddImage sImage iId to IntegerVariable

Description

Call the AddImage function during the OnCreate event to add bitmap or icon images to the grid's image list. The image type is determined by the file extension in the passed image name: .bmp, .ico, .jpg, .png, .gif are all supported.

If the file type cannot be determined by the file extension, then you should use the AddImageType function instead.

Return Value

The index of the image that was added. If the image could not be added, -1 is returned.