ObjectDCL Banner

Grid_SetColumnImage Method

Description

This method sets the image of a column header in a EditableGrid control.

Parameters

MyControlReference
Reference to the control in the form of MyProject_MyForm_MyControl.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.
ControlName
String identifying the control by name.
nColIndex
Integer specifying column index.
nNewImageIndex
Integer specifying index of the picture in the list defined at design to the control. Pass -1 to display no image.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the control is not found, does not support this function or if there is no such column.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_Grid_SetColumnImage 
		MyControlReference [as Reference]
		nColIndex [as Integer]
		nNewImageIndex [as Integer])

An alternative convention is to identify the control by providing the project file, the dialog name and the control name:

CopyCode imageCopy Code
(Odcl_Grid_SetColumnImage
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		nColIndex [as Integer]
		nNewImageIndex [as Integer])

Applies For

EditableGrid.

Example

CopyCode imageCopy Code
; Update the image of the fourth column
(Odcl_Grid_SetColumnImage MyProject_MyForm_MyControl 3 9)

See Also

Grid_AddColumns, Grid_CalcColWidth, Grid_DeleteColumn, Grid_GetColumnCount, Grid_GetColumnImage, Grid_GetColumnItems, Grid_GetColWidth, Grid_SetColWidth, Grid_SortNumericItems, Grid_SortTextItems