A cell's image.

Usage

Set_Property(OLECtrlEntID, "OLE.CellImage[field; record]", StringValue)

Values

StringValue can be any string meeting the following format requirements:

Syntax: [Integer | File Path:@FM:Transparent Color]

Default: ""

Indices

IndexDescription
fieldIndex to an existing field
recordIndex to an existing record

Remarks

The CellImage property sets the image to appear inside the cell. This property accepts two kinds of values: Index into ImageList or Direct File Loading.

To index an image, simply pass an integer. Integers are treated as indexes into the ImageList property image, which only works if the ImageList property has been set before this one.

Direct File Loading is done by passing a 2-field dynamic array into the property in the format: FilePath:@FM:TransparentColor. The FilePath must point to a valid image file. The TransparentColor can be set to "Auto", "None", or a specific color value. If omitted, the default is Auto, which uses the top left pixel to determine the transparent color.

Refer to the Image type documentation for more details on loading images.

To clear the cell's image, set the CellImage property to "".

Cell's can contain both images and text. See the CellImageLayout and CellAlignment properties for more details.

Example

// Load the image list and set cell (1, 1) to use the second frame 
Set_Property(@Window:".OLE_EDITTABLE", "OLE.ImageList", "c:\tableimage.bmp":@FM:3) 
Set_Property(@Window:".OLE_EDITTABLE", "OLE.CellImage[1; 1]", 2) 

// Load an BMP image directly into the cell, using no transparent colors 
Set_Property(@Window:".OLE_EDITTABLE", "OLE.CellImage[1; 1]", "c:\image.bmp":@FM:"None") 

// Load an PNG image directly into the cell, transparent color is embedded in PNG, so no need to specify 
Set_Property(@Window:".OLE_EDITTABLE", "OLE.CellImage[1; 1]", "c:\image.png")

See Also

ImageListHeaderImageCellImageLayout