event AnchorClick (Face as FaceEnum, AnchorID as String, Options as String)
Occurs when an anchor element is clicked.

TypeDescription
Face as FaceEnum The Face where the user clicks an anchor element. 
AnchorID as String A string expression that indicates the identifier of the anchor
Options as String A string expression that specifies options of the anchor element.
The control fires the AnchorClick event to notify that the user clicks an anchor element. An anchor is a piece of text or some other object (for example an image) which marks the beginning and/or the end of a hypertext link. The <a> element is used to mark that piece of text (or inline image), and to give its hypertextual relationship to other documents. The AnchorClick event is fired only if prior clicking the control it shows the hand cursor.  For instance, if the cell is disabled, the hand cursor is not shown when hovers the anchor element, and so the AnchorClick event is not fired. Use the FormatAnchor property to specify the visual effect for anchor elements. For instance, if the user clicks the anchor <a1>anchor</a>, the control fires the AnchorClick event, where the AnchorID parameter is 1, and the Options parameter is empty. Also, if the user clicks the anchor <a 1;yourextradata>anchor</a>, the AnchorID parameter of the AnchorClick event is 1, and the Options parameter is "yourextradata". Use the AnchorFromPoint property to retrieve the identifier of the anchor element from the cursor.

Syntax for AnchorClick event, /NET version, on:

private void AnchorClick(object sender,exontrol.EXTREECUBELib.FaceEnum   Face,string   AnchorID,string   Options)
{
}

Private Sub AnchorClick(ByVal sender As System.Object,ByVal Face As exontrol.EXTREECUBELib.FaceEnum,ByVal AnchorID As String,ByVal Options As String) Handles AnchorClick
End Sub

Syntax for AnchorClick event, /COM version, on:

private void AnchorClick(object sender, AxEXTREECUBELib._ITreeCubeEvents_AnchorClickEvent e)
{
}

void OnAnchorClick(long   Face,LPCTSTR   AnchorID,LPCTSTR   Options)
{
}

void __fastcall AnchorClick(TObject *Sender,Extreecubelib_tlb::FaceEnum   Face,BSTR   AnchorID,BSTR   Options)
{
}

procedure AnchorClick(ASender: TObject; Face : FaceEnum;AnchorID : WideString;Options : WideString);
begin
end;

procedure AnchorClick(sender: System.Object; e: AxEXTREECUBELib._ITreeCubeEvents_AnchorClickEvent);
begin
end;

begin event AnchorClick(long  Face,string  AnchorID,string  Options)

end event AnchorClick

Private Sub AnchorClick(ByVal sender As System.Object, ByVal e As AxEXTREECUBELib._ITreeCubeEvents_AnchorClickEvent) Handles AnchorClick
End Sub

Private Sub AnchorClick(ByVal Face As EXTREECUBELibCtl.FaceEnum,ByVal AnchorID As String,ByVal Options As String)
End Sub

Private Sub AnchorClick(ByVal Face As Long,ByVal AnchorID As String,ByVal Options As String)
End Sub

LPARAMETERS Face,AnchorID,Options

PROCEDURE OnAnchorClick(oTreeCube,Face,AnchorID,Options)

RETURN

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

<SCRIPT EVENT="AnchorClick(Face,AnchorID,Options)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function AnchorClick(Face,AnchorID,Options)
End Function
</SCRIPT>

Procedure OnComAnchorClick OLEFaceEnum   llFace String   llAnchorID String   llOptions
	Forward Send OnComAnchorClick llFace llAnchorID llOptions
End_Procedure

METHOD OCX_AnchorClick(Face,AnchorID,Options) CLASS MainDialog
RETURN NIL

void onEvent_AnchorClick(int   _Face,str   _AnchorID,str   _Options)
{
}

function AnchorClick as v (Face  as  OLE::Exontrol.TreeCube.1::FaceEnum,AnchorID  as  C,Options  as  C)
end function

function nativeObject_AnchorClick(Face,AnchorID,Options)
return

How can I display a hyperlink element?

VBA (MS Access, Excell...)

' AnchorClick event - Occurs when an anchor element is clicked.
Private Sub TreeCube1_AnchorClick(ByVal Face As Long,ByVal AnchorID As String,ByVal Options As String)
	With TreeCube1
		Debug.Print( Face )
		Debug.Print( AnchorID )
		Debug.Print( Options )
	End With
End Sub

With TreeCube1
	With .FrontFace.CreateTree
		.ShowSelection = False
		.HeaderVisible = False
		.DrawGridLines = 0
		.Items.ToString = "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"
	End With
End With

VB6

' AnchorClick event - Occurs when an anchor element is clicked.
Private Sub TreeCube1_AnchorClick(ByVal Face As EXTREECUBELibCtl.FaceEnum,ByVal AnchorID As String,ByVal Options As String)
	With TreeCube1
		Debug.Print( Face )
		Debug.Print( AnchorID )
		Debug.Print( Options )
	End With
End Sub

With TreeCube1
	With .FrontFace.CreateTree
		.ShowSelection = False
		.HeaderVisible = False
		.DrawGridLines = exNoLines
		.Items.ToString = "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"
	End With
End With

VB.NET

' AnchorClick event - Occurs when an anchor element is clicked.
Private Sub Extreecube1_AnchorClick(ByVal sender As System.Object,ByVal Face As exontrol.EXTREECUBELib.FaceEnum,ByVal AnchorID As String,ByVal Options As String) Handles Extreecube1.AnchorClick
	With Extreecube1
		Debug.Print( Face )
		Debug.Print( AnchorID )
		Debug.Print( Options )
	End With
End Sub

With Extreecube1
	With .FrontFace.CreateTree()
		.ShowSelection = False
		.HeaderVisible = False
		.DrawGridLines = exontrol.EXTREECUBELib.GridLinesEnum.exNoLines
		.Items.ToString = "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"
	End With
End With

VB.NET for /COM

' AnchorClick event - Occurs when an anchor element is clicked.
Private Sub AxTreeCube1_AnchorClick(ByVal sender As System.Object, ByVal e As AxEXTREECUBELib._ITreeCubeEvents_AnchorClickEvent) Handles AxTreeCube1.AnchorClick
	With AxTreeCube1
		Debug.Print( e.face )
		Debug.Print( e.anchorID )
		Debug.Print( e.options )
	End With
End Sub

With AxTreeCube1
	With .FrontFace.CreateTree()
		.ShowSelection = False
		.HeaderVisible = False
		.DrawGridLines = EXTREECUBELib.GridLinesEnum.exNoLines
		.Items.ToString = "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"
	End With
End With

C++

// AnchorClick event - Occurs when an anchor element is clicked.
void OnAnchorClickTreeCube1(long   Face,LPCTSTR   AnchorID,LPCTSTR   Options)
{
	OutputDebugStringW( L"Face" );
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXTREECUBELib' for the library: 'ExTreeCube 1.0 Control Library'
		#import <ExTreeCube.dll>
		using namespace EXTREECUBELib;
	*/
	EXTREECUBELib::ITreeCubePtr spTreeCube1 = GetDlgItem(IDC_TREECUBE1)->GetControlUnknown();
	OutputDebugStringW( L"AnchorID" );
	OutputDebugStringW( L"Options" );
}

EXTREECUBELib::ITreeCubePtr spTreeCube1 = GetDlgItem(IDC_TREECUBE1)->GetControlUnknown();
EXTREECUBELib::IFaceTreePtr var_FaceTree = spTreeCube1->GetFrontFace()->CreateTree();
	var_FaceTree->PutShowSelection(VARIANT_FALSE);
	var_FaceTree->PutHeaderVisible(VARIANT_FALSE);
	var_FaceTree->PutDrawGridLines(EXTREECUBELib::exNoLines);
	var_FaceTree->GetItems()->PutToString(L"<a A1\\;options1>Item 1</a>,<a A2\\;options2>Item 2</a>");

C++ Builder

// AnchorClick event - Occurs when an anchor element is clicked.
void __fastcall TForm1::TreeCube1AnchorClick(TObject *Sender,Extreecubelib_tlb::FaceEnum   Face,BSTR   AnchorID,BSTR   Options)
{
	OutputDebugString( L"Face" );
	OutputDebugString( L"AnchorID" );
	OutputDebugString( L"Options" );
}

Extreecubelib_tlb::IFaceTreePtr var_FaceTree = TreeCube1->FrontFace->CreateTree();
	var_FaceTree->ShowSelection = false;
	var_FaceTree->HeaderVisible = false;
	var_FaceTree->DrawGridLines = Extreecubelib_tlb::GridLinesEnum::exNoLines;
	var_FaceTree->Items->ToString = L"<a A1\\;options1>Item 1</a>,<a A2\\;options2>Item 2</a>";

C#

// AnchorClick event - Occurs when an anchor element is clicked.
private void extreecube1_AnchorClick(object sender,exontrol.EXTREECUBELib.FaceEnum   Face,string   AnchorID,string   Options)
{
	System.Diagnostics.Debug.Print( Face.ToString() );
	System.Diagnostics.Debug.Print( AnchorID.ToString() );
	System.Diagnostics.Debug.Print( Options.ToString() );
}
//this.extreecube1.AnchorClick += new exontrol.EXTREECUBELib.exg2antt.AnchorClickEventHandler(this.extreecube1_AnchorClick);

exontrol.EXTREECUBELib.FaceTree var_FaceTree = extreecube1.FrontFace.CreateTree();
	var_FaceTree.ShowSelection = false;
	var_FaceTree.HeaderVisible = false;
	var_FaceTree.DrawGridLines = exontrol.EXTREECUBELib.GridLinesEnum.exNoLines;
	var_FaceTree.Items.ToString = "<a A1\\;options1>Item 1</a>,<a A2\\;options2>Item 2</a>";

JScript/JavaScript

<BODY onload="Init()">
<SCRIPT FOR="TreeCube1" EVENT="AnchorClick(Face,AnchorID,Options)" LANGUAGE="JScript">
	alert( Face );
	alert( AnchorID );
	alert( Options );
</SCRIPT>

<OBJECT CLASSID="clsid:13A5B44B-DBB7-42F2-AE2B-943A6CF6C8B9" id="TreeCube1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	var var_FaceTree = TreeCube1.FrontFace.CreateTree();
		var_FaceTree.ShowSelection = false;
		var_FaceTree.HeaderVisible = false;
		var_FaceTree.DrawGridLines = 0;
		var_FaceTree.Items.ToString = "<a A1\\;options1>Item 1</a>,<a A2\\;options2>Item 2</a>";
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function TreeCube1_AnchorClick(Face,AnchorID,Options)
	With TreeCube1
		alert( Face )
		alert( AnchorID )
		alert( Options )
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:13A5B44B-DBB7-42F2-AE2B-943A6CF6C8B9" id="TreeCube1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With TreeCube1
		With .FrontFace.CreateTree
			.ShowSelection = False
			.HeaderVisible = False
			.DrawGridLines = 0
			.Items.ToString = "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"
		End With
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

// AnchorClick event - Occurs when an anchor element is clicked.
private void axTreeCube1_AnchorClick(object sender, AxEXTREECUBELib._ITreeCubeEvents_AnchorClickEvent e)
{
	System.Diagnostics.Debug.Print( e.face.ToString() );
	System.Diagnostics.Debug.Print( e.anchorID.ToString() );
	System.Diagnostics.Debug.Print( e.options.ToString() );
}
//this.axTreeCube1.AnchorClick += new AxEXTREECUBELib._ITreeCubeEvents_AnchorClickEventHandler(this.axTreeCube1_AnchorClick);

EXTREECUBELib.FaceTree var_FaceTree = axTreeCube1.FrontFace.CreateTree();
	var_FaceTree.ShowSelection = false;
	var_FaceTree.HeaderVisible = false;
	var_FaceTree.DrawGridLines = EXTREECUBELib.GridLinesEnum.exNoLines;
	var_FaceTree.Items.ToString = "<a A1\\;options1>Item 1</a>,<a A2\\;options2>Item 2</a>";

X++ (Dynamics Ax 2009)

// AnchorClick event - Occurs when an anchor element is clicked.
void onEvent_AnchorClick(int   _Face,str   _AnchorID,str   _Options)
{
	;
	print( _Face );
	print( _AnchorID );
	print( _Options );
}

public void init()
{
	COM com_FaceTree,com_Items;
	anytype var_FaceTree,var_Items;
	;

	super();

	var_FaceTree = extreecube1.FrontFace().CreateTree(); com_FaceTree = var_FaceTree;
		com_FaceTree.ShowSelection(false);
		com_FaceTree.HeaderVisible(false);
		com_FaceTree.DrawGridLines(0/*exNoLines*/);
		var_Items = COM::createFromObject(com_FaceTree.Items()); com_Items = var_Items;
		com_Items.ToString("<a A1\\;options1>Item 1</a>,<a A2\\;options2>Item 2</a>");
}

Delphi 8 (.NET only)

// AnchorClick event - Occurs when an anchor element is clicked.
procedure TWinForm1.AxTreeCube1_AnchorClick(sender: System.Object; e: AxEXTREECUBELib._ITreeCubeEvents_AnchorClickEvent);
begin
	with AxTreeCube1 do
	begin
		OutputDebugString( e.face );
		OutputDebugString( e.anchorID );
		OutputDebugString( e.options );
	end
end;

with AxTreeCube1 do
begin
	with FrontFace.CreateTree() do
	begin
		ShowSelection := False;
		HeaderVisible := False;
		DrawGridLines := EXTREECUBELib.GridLinesEnum.exNoLines;
		Items.ToString := '<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>';
	end;
end

Delphi (standard)

// AnchorClick event - Occurs when an anchor element is clicked.
procedure TForm1.TreeCube1AnchorClick(ASender: TObject; Face : FaceEnum;AnchorID : WideString;Options : WideString);
begin
	with TreeCube1 do
	begin
		OutputDebugString( Face );
		OutputDebugString( AnchorID );
		OutputDebugString( Options );
	end
end;

with TreeCube1 do
begin
	with FrontFace.CreateTree() do
	begin
		ShowSelection := False;
		HeaderVisible := False;
		DrawGridLines := EXTREECUBELib_TLB.exNoLines;
		Items.ToString := '<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>';
	end;
end

VFP

*** AnchorClick event - Occurs when an anchor element is clicked. ***
LPARAMETERS Face,AnchorID,Options
	with thisform.TreeCube1
		DEBUGOUT( Face )
		DEBUGOUT( AnchorID )
		DEBUGOUT( Options )
	endwith

with thisform.TreeCube1
	with .FrontFace.CreateTree
		.ShowSelection = .F.
		.HeaderVisible = .F.
		.DrawGridLines = 0
		.Items.ToString = "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"
	endwith
endwith

dBASE Plus

/*
with (this.EXTREECUBEACTIVEXCONTROL1.nativeObject)
	AnchorClick = class::nativeObject_AnchorClick
endwith
*/
// Occurs when an anchor element is clicked.
function nativeObject_AnchorClick(Face,AnchorID,Options)
	oTreeCube = form.EXTREECUBEACTIVEXCONTROL1.nativeObject
	? Str(Face) 
	? Str(AnchorID) 
	? Str(Options) 
return

local oTreeCube,var_FaceTree

oTreeCube = form.EXTREECUBEACTIVEXCONTROL1.nativeObject
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.ShowSelection = false
	var_FaceTree.HeaderVisible = false
	var_FaceTree.DrawGridLines = 0
	var_FaceTree.Items.ToString = "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"

XBasic (Alpha Five)

' Occurs when an anchor element is clicked.
function AnchorClick as v (Face  as  OLE::Exontrol.TreeCube.1::FaceEnum,AnchorID  as  C,Options  as  C)
	oTreeCube = topparent:CONTROL_ACTIVEX1.activex
	? Face 
	? AnchorID 
	? Options 
end function

Dim oTreeCube as P
Dim var_FaceTree as P

oTreeCube = topparent:CONTROL_ACTIVEX1.activex
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.ShowSelection = .f.
	var_FaceTree.HeaderVisible = .f.
	var_FaceTree.DrawGridLines = 0
	var_FaceTree.Items.ToString = "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"

Visual Objects

METHOD OCX_Exontrol1AnchorClick(Face,AnchorID,Options) CLASS MainDialog
	// AnchorClick event - Occurs when an anchor element is clicked.
	OutputDebugString(String2Psz( AsString(Face) ))
	OutputDebugString(String2Psz( AsString(AnchorID) ))
	OutputDebugString(String2Psz( AsString(Options) ))
RETURN NIL

local var_FaceTree as IFaceTree

var_FaceTree := oDCOCX_Exontrol1:FrontFace:CreateTree()
	var_FaceTree:ShowSelection := false
	var_FaceTree:HeaderVisible := false
	var_FaceTree:DrawGridLines := exNoLines
	var_FaceTree:Items:ToString := "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"

PowerBuilder

/*begin event AnchorClick(long  Face,string  AnchorID,string  Options) - Occurs when an anchor element is clicked.*/
/*
	oTreeCube = ole_1.Object
	MessageBox("Information",string( String(Face) ))
	MessageBox("Information",string( String(AnchorID) ))
	MessageBox("Information",string( String(Options) ))
*/
/*end event AnchorClick*/

OleObject oTreeCube,var_FaceTree

oTreeCube = ole_1.Object
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.ShowSelection = false
	var_FaceTree.HeaderVisible = false
	var_FaceTree.DrawGridLines = 0
	var_FaceTree.Items.ToString = "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"

Visual DataFlex

// Occurs when an anchor element is clicked.
Procedure OnComAnchorClick OLEFaceEnum   llFace String   llAnchorID String   llOptions
	Forward Send OnComAnchorClick llFace llAnchorID llOptions
	Showln llFace llAnchorID llOptions
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Variant voFace
	Get ComFrontFace to voFace
	Handle hoFace
	Get Create (RefClass(cComFace)) to hoFace
	Set pvComObject of hoFace to voFace
		Variant voFaceTree
		Get ComCreateTree of hoFace to voFaceTree
		Handle hoFaceTree
		Get Create (RefClass(cComFaceTree)) to hoFaceTree
		Set pvComObject of hoFaceTree to voFaceTree
			Set ComShowSelection of hoFaceTree to False
			Set ComHeaderVisible of hoFaceTree to False
			Set ComDrawGridLines of hoFaceTree to OLEexNoLines
			Variant voItems
			Get ComItems of hoFaceTree to voItems
			Handle hoItems
			Get Create (RefClass(cComItems)) to hoItems
			Set pvComObject of hoItems to voItems
				Set ComToString of hoItems to "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"
			Send Destroy to hoItems
		Send Destroy to hoFaceTree
	Send Destroy to hoFace
End_Procedure

XBase++

PROCEDURE OnAnchorClick(oTreeCube,Face,AnchorID,Options)
	DevOut( Transform(Face,"") )
	DevOut( Transform(AnchorID,"") )
	DevOut( Transform(Options,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oFaceTree
	LOCAL oTreeCube

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTreeCube := XbpActiveXControl():new( oForm:drawingArea )
	oTreeCube:CLSID  := "Exontrol.TreeCube.1" /*{13A5B44B-DBB7-42F2-AE2B-943A6CF6C8B9}*/
	oTreeCube:create(,, {10,60},{610,370} )

		oTreeCube:AnchorClick := {|Face,AnchorID,Options| OnAnchorClick(oTreeCube,Face,AnchorID,Options)} /*Occurs when an anchor element is clicked.*/

		oFaceTree := oTreeCube:FrontFace():CreateTree()
			oFaceTree:ShowSelection := .F.
			oFaceTree:HeaderVisible := .F.
			oFaceTree:DrawGridLines := 0/*exNoLines*/
			oFaceTree:Items():ToString := "<a A1\;options1>Item 1</a>,<a A2\;options2>Item 2</a>"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN