Type | Description | |||
ItemIndex as Long | A long value that indicates the index of item being clicked. | |||
ColIndex as Long | A long value that indicates the index of column, where the cell's icon is clicked. |
The CellImageClick event is fired when user clicks on the cell's image. Use the CellImage property to assign an icon to a cell. Use the CellImages property to assign multiple icons to a cell. Use the ItemFromPoint property to determine the index of the icon being clicked, in case the cell displays multiple icons using the CellImages property. Use the CellHasCheckBox or CellHasRadioButton property to assign a check box or a radio button to a cell.
Syntax for CellImageClick event, /NET version, on:
private void CellImageClick(object sender,int ItemIndex,int ColIndex) { } Private Sub CellImageClick(ByVal sender As System.Object,ByVal ItemIndex As Integer,ByVal ColIndex As Integer) Handles CellImageClick End Sub |
private void CellImageClick(object sender, AxEXLISTLib._IListEvents_CellImageClickEvent e) { } void OnCellImageClick(long ItemIndex,long ColIndex) { } void __fastcall CellImageClick(TObject *Sender,long ItemIndex,long ColIndex) { } procedure CellImageClick(ASender: TObject; ItemIndex : Integer;ColIndex : Integer); begin end; procedure CellImageClick(sender: System.Object; e: AxEXLISTLib._IListEvents_CellImageClickEvent); begin end; begin event CellImageClick(long ItemIndex,long ColIndex) end event CellImageClick Private Sub CellImageClick(ByVal sender As System.Object, ByVal e As AxEXLISTLib._IListEvents_CellImageClickEvent) Handles CellImageClick End Sub Private Sub CellImageClick(ByVal ItemIndex As Long,ByVal ColIndex As Long) End Sub Private Sub CellImageClick(ByVal ItemIndex As Long,ByVal ColIndex As Long) End Sub LPARAMETERS ItemIndex,ColIndex PROCEDURE OnCellImageClick(oList,ItemIndex,ColIndex) RETURN |
<SCRIPT EVENT="CellImageClick(ItemIndex,ColIndex)" LANGUAGE="JScript"> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> Function CellImageClick(ItemIndex,ColIndex) End Function </SCRIPT> Procedure OnComCellImageClick Integer llItemIndex Integer llColIndex Forward Send OnComCellImageClick llItemIndex llColIndex End_Procedure METHOD OCX_CellImageClick(ItemIndex,ColIndex) CLASS MainDialog RETURN NIL void onEvent_CellImageClick(int _ItemIndex,int _ColIndex) { } function CellImageClick as v (ItemIndex as N,ColIndex as N) end function function nativeObject_CellImageClick(ItemIndex,ColIndex) return |
The following VB sample changes the cell's icon when it is clicked:
Private Sub List1_CellImageClick(ByVal Index As Long, ByVal ColIndex As Long) With List1.Items .CellImage(Index, ColIndex) = 1 + (.CellImage(Index, ColIndex)) Mod 2 End With End Sub
The following C++ sample changes the cell's icon when it is clicked:
void OnCellImageClickList1(long ItemIndex, long ColIndex) { COleVariant vtColumn( ColIndex ); CItems items = m_list.GetItems(); items.SetCellImage( ItemIndex, vtColumn, ( items.GetCellImage( ItemIndex, vtColumn ) % 2 ) + 1 ); }
The following VB.NET sample changes the cell's icon when it is clicked:
Private Sub AxList1_CellImageClick(ByVal sender As Object, ByVal e As AxEXLISTLib._IListEvents_CellImageClickEvent) Handles AxList1.CellImageClick With AxList1.Items .CellImage(e.itemIndex, e.colIndex) = .CellImage(e.itemIndex, e.colIndex) Mod 2 + 1 End With End Sub
The following C# sample changes the cell's icon when it is clicked:
private void axList1_CellImageClick(object sender, AxEXLISTLib._IListEvents_CellImageClickEvent e) { axList1.Items.set_CellImage(e.itemIndex, e.colIndex, axList1.Items.get_CellImage(e.itemIndex, e.colIndex) % 2 + 1); }
The following VFP sample changes the cell's icon when it is clicked:
*** ActiveX Control Event *** LPARAMETERS itemindex, colindex with thisform.List1.Items .CellImage( itemindex, colindex ) = mod( .CellImage( itemindex, colindex ), 2) + 1 endwith