event CellButtonClick (Item as HITEM, ColIndex as Long)

Fired after the user clicks on the cell of button type.

TypeDescription
Item as HITEM A long expression that indicates the handle of the item where the user clicks the cell's button.
ColIndex as Long A long expression that specifies the index of the column where the user clicks the cell's button, or a long  expression that indicates the handle of the cell being clicked, if the Item parameter is 0.

The CellButtonClick event is fired after the user has released the left mouse button over a cell of button type.  Use the CellHasButton property to specify whether a cell is of button type. The CellButtonClick event notifies your application that user presses a cell of button type. 

Syntax for CellButtonClick event, /NET version, on:

private void CellButtonClick(object sender,int Item,int ColIndex)
{
}

Private Sub CellButtonClick(ByVal sender As System.Object,ByVal Item As Integer,ByVal ColIndex As Integer) Handles CellButtonClick
End Sub

Syntax for CellButtonClick event, /COM version, on:

private void CellButtonClick(object sender, AxEXGANTTLib._IGanttEvents_CellButtonClickEvent e)
{
}

void OnCellButtonClick(long Item,long ColIndex)
{
}

void __fastcall CellButtonClick(TObject *Sender,Exganttlib_tlb::HITEM Item,long ColIndex)
{
}

procedure CellButtonClick(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
end;

procedure CellButtonClick(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_CellButtonClickEvent);
begin
end;

begin event CellButtonClick(long Item,long ColIndex)
end event CellButtonClick

Private Sub CellButtonClick(ByVal sender As System.Object, ByVal e As AxEXGANTTLib._IGanttEvents_CellButtonClickEvent) Handles CellButtonClick
End Sub

Private Sub CellButtonClick(ByVal Item As EXGANTTLibCtl.HITEM,ByVal ColIndex As Long)
End Sub

Private Sub CellButtonClick(ByVal Item As Long,ByVal ColIndex As Long)
End Sub

LPARAMETERS Item,ColIndex

PROCEDURE OnCellButtonClick(oGantt,Item,ColIndex)
RETURN

Syntax for CellButtonClick event, /COM version (others), on:

<SCRIPT EVENT="CellButtonClick(Item,ColIndex)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function CellButtonClick(Item,ColIndex)
End Function
</SCRIPT>

Procedure OnComCellButtonClick HITEM llItem Integer llColIndex
	Forward Send OnComCellButtonClick llItem llColIndex
End_Procedure

METHOD OCX_CellButtonClick(Item,ColIndex) CLASS MainDialog
RETURN NIL

void onEvent_CellButtonClick(int _Item,int _ColIndex)
{
}

function CellButtonClick as v (Item as OLE::Exontrol.Gantt.1::HITEM,ColIndex as N)
end function

function nativeObject_CellButtonClick(Item,ColIndex)
return

The following VB sample sets the cells of the first column to be of button type, and displays a message when one of them has been clicked.

Private Sub Gantt1_AddItem(ByVal Item As EXGANTTLibCtl.HITEM)
    Gantt1.Items.CellHasButton(Item, 0) = True
End Sub

Private Sub Gantt1_CellButtonClick(ByVal Item As EXGANTTLibCtl.HITEM, ByVal ColIndex As Long)
    MsgBox "The cell of button type has been clicked"
End Sub

The following VB.NET sample displays a message when the user clicks a button in the cell:

Private Sub AxGantt1_CellButtonClick(ByVal sender As Object, ByVal e As AxEXGANTTLib._IGanttEvents_CellButtonClickEvent) Handles AxGantt1.CellButtonClick
    MsgBox("The cell of button type has been clicked")
End Sub

The following C# sample displays a message when the user clicks a button in the cell:

private void axGantt1_CellButtonClick(object sender, AxEXGANTTLib._IGanttEvents_CellButtonClickEvent e)
{
	MessageBox.Show("The cell of button type has been clicked");
}

The following C++ sample displays a message when the user clicks a button in the cell:

void OnCellButtonClickGantt1(long Item, long ColIndex) 
{
	MessageBox( "The cell of button type has been clicked." );
}

The following VFP sample displays a message when the user clicks a button in the cell:

*** ActiveX Control Event ***
LPARAMETERS item, colindex

wait window "The cell of button type has been clicked."