event HyperLinkClick (Item as HITEM, ColIndex as Long)

Occurs when the user clicks on a hyperlink cell.

TypeDescription
Item as HITEM A long expression that indicates the item's handle.
ColIndex as Long A long expression that indicates the column's index.

The HyperLinkClick event is fired when user clicks a hyperlink cell. A hyperlink cell has the CellHyperLink property on True. The control changes the shape of the cursor when the mouse hovers a hyper linkcell.  Use the HyperLinkClick event to notify your application that a hyperlink cell is clicked. Use the HyperLinkColor property to specify the hyperlink color. The HyperLinkClick event is fired only if the user clicks a cell that has the CellHyperLink property on True. Use the ItemFromPoint property to get an item or a cell from point. Use the ColumnFromPoint property to get the column from point.

Syntax for HyperLinkClick event, /NET version, on:

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

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

Syntax for HyperLinkClick event, /COM version, on:

private void HyperLinkClick(object sender, AxEXGANTTLib._IGanttEvents_HyperLinkClickEvent e)
{
}

void OnHyperLinkClick(long Item,long ColIndex)
{
}

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

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

procedure HyperLinkClick(sender: System.Object; e: AxEXGANTTLib._IGanttEvents_HyperLinkClickEvent);
begin
end;

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

Private Sub HyperLinkClick(ByVal sender As System.Object, ByVal e As AxEXGANTTLib._IGanttEvents_HyperLinkClickEvent) Handles HyperLinkClick
End Sub

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

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

LPARAMETERS Item,ColIndex

PROCEDURE OnHyperLinkClick(oGantt,Item,ColIndex)
RETURN

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

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

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

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

METHOD OCX_HyperLinkClick(Item,ColIndex) CLASS MainDialog
RETURN NIL

void onEvent_HyperLinkClick(int _Item,int _ColIndex)
{
}

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

function nativeObject_HyperLinkClick(Item,ColIndex)
return

The following VB sample displays the caption of the hyperlink cell that's been clicked:

Private Sub Gantt1_HyperLinkClick(ByVal Item As EXGANTTLibCtl.HITEM, ByVal ColIndex As Long)
    Debug.Print Gantt1.Items.CellCaption(Item, ColIndex)
End Sub

The following VC sample displays the caption of the hyperlink cell that's been clicked:

#include "Items.h"

static CString V2S( VARIANT* pv, LPCTSTR szDefault = _T("") )
{
	if ( pv )
	{
		if ( pv->vt == VT_ERROR )
			return szDefault;

		COleVariant vt;
		vt.ChangeType( VT_BSTR, pv );
		return V_BSTR( &vt );
	}
	return szDefault;
}

void OnHyperLinkClickGantt1(long Item, long ColIndex) 
{
	CItems items = m_gantt.GetItems();
	COleVariant vtItem( Item ), vtColumn( ColIndex );
	OutputDebugString( V2S( &items.GetCellCaption( vtItem, vtColumn ) ) );
}

The following VB.NET sample displays the caption of the hyperlink cell that's been clicked:

Private Sub AxGantt1_HyperLinkClick(ByVal sender As Object, ByVal e As AxEXGANTTLib._IGanttEvents_HyperLinkClickEvent) Handles AxGantt1.HyperLinkClick
    With AxGantt1.Items
        Debug.WriteLine(.CellCaption(e.item, e.colIndex))
    End With
End Sub

The following C# sample displays the caption of the hyperlink cell that's been clicked:

private void axGantt1_HyperLinkClick(object sender, AxEXGANTTLib._IGanttEvents_HyperLinkClickEvent e)
{
	System.Diagnostics.Debug.WriteLine( axGantt1.Items.get_CellCaption(e.item, e.colIndex ) );
}

The following VFP sample displays the caption of the hyperlink cell that's been clicked:

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

with thisform.Gantt1.Items
	.DefaultItem = item
	wait window nowait .CellCaption( 0, colindex )
endwith