event Click ()
Occurs when the user presses and then releases the left mouse button over the list control.

TypeDescription

The Click event is fired when the user releases the left mouse button over the control. Use a MouseDown or MouseUp event procedure to specify actions that will occur when a mouse button is pressed or released. Unlike the Click MouseDown and MouseUp events lets you distinguish between the left, right, and middle mouse buttons. You can also write code for mouse-keyboard combinations that use the SHIFT, CTRL, and ALT keyboard modifiers. The WordFromCursor(-1,-1) property indicates the word from the cursor.

Syntax for Click event, /NET version, on:

private void Click(object sender)
{
}

Private Sub Click(ByVal sender As System.Object) Handles Click
End Sub

Syntax for Click event, /COM version, on:

private void ClickEvent(object sender, EventArgs e)
{
}

void OnClick()
{
}

void __fastcall Click(TObject *Sender)
{
}

procedure Click(ASender: TObject; );
begin
end;

procedure ClickEvent(sender: System.Object; e: System.EventArgs);
begin
end;

begin event Click()
end event Click

Private Sub ClickEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClickEvent
End Sub

Private Sub Click()
End Sub

Private Sub Click()
End Sub

LPARAMETERS nop

PROCEDURE OnClick(oExpression)
RETURN

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

<SCRIPT EVENT="Click()" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function Click()
End Function
</SCRIPT>

Procedure OnComClick 
	Forward Send OnComClick 
End_Procedure

METHOD OCX_Click() CLASS MainDialog
RETURN NIL

void onEvent_Click()
{
}

function Click as v ()
end function

function nativeObject_Click()
return

The following samples determines the word from the cursor:

VBA (MS Access, Excell...)

' Click event - Occurs when the user presses and then releases the left mouse button over the list control.
Private Sub Expression1_Click()
	With Expression1
		Debug.Print( "Word: " )
		Debug.Print( .WordFromPoint(-1,-1) )
	End With
End Sub

With Expression1
	.Expression = "value"
	.SplitPaneHeight = 196
	.Background(1) = RGB(240,240,240)
	.AllowSplitter = 2
End With

VB6

' Click event - Occurs when the user presses and then releases the left mouse button over the list control.
Private Sub Expression1_Click()
	With Expression1
		Debug.Print( "Word: " )
		Debug.Print( .WordFromPoint(-1,-1) )
	End With
End Sub

With Expression1
	.Expression = "value"
	.SplitPaneHeight = 196
	.Background(exVSplitterApp) = RGB(240,240,240)
	.AllowSplitter = exVSplitter
End With

VB.NET

' Click event - Occurs when the user presses and then releases the left mouse button over the list control.
Private Sub Expression1_Click(ByVal sender As System.Object) Handles Expression1.Click
	With Expression1
		Debug.Print( "Word: " )
		Debug.Print( .get_WordFromPoint(-1,-1) )
	End With
End Sub

With Expression1
	.Expression = "value"
	.SplitPaneHeight = 196
	.set_Background(exontrol.EXPRESSIONLib.BackgroundPartEnum.exVSplitterApp,Color.FromArgb(240,240,240))
	.AllowSplitter = exontrol.EXPRESSIONLib.SplitterEnum.exVSplitter
End With

VB.NET for /COM

' Click event - Occurs when the user presses and then releases the left mouse button over the list control.
Private Sub AxExpression1_ClickEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxExpression1.ClickEvent
	With AxExpression1
		Debug.Print( "Word: " )
		Debug.Print( .get_WordFromPoint(-1,-1) )
	End With
End Sub

With AxExpression1
	.Expression = "value"
	.SplitPaneHeight = 196
	.set_Background(EXPRESSIONLib.BackgroundPartEnum.exVSplitterApp,15790320)
	.AllowSplitter = EXPRESSIONLib.SplitterEnum.exVSplitter
End With

C++

// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
void OnClickExpression1()
{
	/*
		Copy and paste the following directives to your header file as
		it defines the namespace 'EXPRESSIONLib' for the library: 'Expression 1.0 Control Library'
		#import <Expression.dll>
		using namespace EXPRESSIONLib;
	*/
	EXPRESSIONLib::IExpressionPtr spExpression1 = GetDlgItem(IDC_EXPRESSION1)->GetControlUnknown();
	OutputDebugStringW( L"Word: " );
	OutputDebugStringW( spExpression1->GetWordFromPoint(-1,-1,vtMissing) );
}

EXPRESSIONLib::IExpressionPtr spExpression1 = GetDlgItem(IDC_EXPRESSION1)->GetControlUnknown();
spExpression1->PutExpression(L"value");
spExpression1->PutSplitPaneHeight(196);
spExpression1->PutBackground(EXPRESSIONLib::exVSplitterApp,RGB(240,240,240));
spExpression1->PutAllowSplitter(EXPRESSIONLib::exVSplitter);

C++ Builder

// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
void __fastcall TForm1::Expression1Click(TObject *Sender)
{
	OutputDebugString( L"Word: " );
	OutputDebugString( Expression1->WordFromPoint[-1,-1,TNoParam()] );
}

Expression1->Expression = L"value";
Expression1->SplitPaneHeight = 196;
Expression1->Background[Expressionlib_tlb::BackgroundPartEnum::exVSplitterApp] = RGB(240,240,240);
Expression1->AllowSplitter = Expressionlib_tlb::SplitterEnum::exVSplitter;

C#

// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
private void expression1_Click(object sender)
{
	System.Diagnostics.Debug.Print( "Word: " );
	System.Diagnostics.Debug.Print( expression1.get_WordFromPoint(-1,-1,null) );
}
//this.expression1.Click += new exontrol.EXPRESSIONLib.exg2antt.ClickEventHandler(this.expression1_Click);

expression1.Expression = "value";
expression1.SplitPaneHeight = 196;
expression1.set_Background(exontrol.EXPRESSIONLib.BackgroundPartEnum.exVSplitterApp,Color.FromArgb(240,240,240));
expression1.AllowSplitter = exontrol.EXPRESSIONLib.SplitterEnum.exVSplitter;

JScript/JavaScript

<BODY onload="Init()">
<SCRIPT FOR="Expression1" EVENT="Click()" LANGUAGE="JScript">
	alert( "Word: " );
	alert( Expression1.WordFromPoint(-1,-1,null) );
</SCRIPT>

<OBJECT CLASSID="clsid:B33F5489-49AC-4155-98E7-9BBFC57FF019" id="Expression1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	Expression1.Expression = "value";
	Expression1.SplitPaneHeight = 196;
	Expression1.Background(1) = 15790320;
	Expression1.AllowSplitter = 2;
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function Expression1_Click()
	With Expression1
		alert( "Word: " )
		alert( .WordFromPoint(-1,-1) )
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:B33F5489-49AC-4155-98E7-9BBFC57FF019" id="Expression1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Expression1
		.Expression = "value"
		.SplitPaneHeight = 196
		.Background(1) = RGB(240,240,240)
		.AllowSplitter = 2
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
private void axExpression1_ClickEvent(object sender, EventArgs e)
{
	System.Diagnostics.Debug.Print( "Word: " );
	System.Diagnostics.Debug.Print( axExpression1.get_WordFromPoint(-1,-1,null) );
}
//this.axExpression1.ClickEvent += new EventHandler(this.axExpression1_ClickEvent);

axExpression1.Expression = "value";
axExpression1.SplitPaneHeight = 196;
axExpression1.set_Background(EXPRESSIONLib.BackgroundPartEnum.exVSplitterApp,(uint)ColorTranslator.ToWin32(Color.FromArgb(240,240,240)));
axExpression1.AllowSplitter = EXPRESSIONLib.SplitterEnum.exVSplitter;

X++ (Dynamics Ax 2009)

// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
void onEvent_Click()
{
	;
	print( "Word: " );
	print( expression1.WordFromPoint(-1,-1) );
}

public void init()
{
	;

	super();

	expression1.Expression("value");
	expression1.SplitPaneHeight(196);
	expression1.Background(1/*exVSplitterApp*/,WinApi::RGB2int(240,240,240));
	expression1.AllowSplitter(2/*exVSplitter*/);
}

Delphi 8 (.NET only)

// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
procedure TWinForm1.AxExpression1_ClickEvent(sender: System.Object; e: System.EventArgs);
begin
	with AxExpression1 do
	begin
		OutputDebugString( 'Word: ' );
		OutputDebugString( get_WordFromPoint(-1,-1,Nil) );
	end
end;

with AxExpression1 do
begin
	Expression := 'value';
	SplitPaneHeight := 196;
	set_Background(EXPRESSIONLib.BackgroundPartEnum.exVSplitterApp,$f0f0f0);
	AllowSplitter := EXPRESSIONLib.SplitterEnum.exVSplitter;
end

Delphi (standard)

// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
procedure TForm1.Expression1Click(ASender: TObject; );
begin
	with Expression1 do
	begin
		OutputDebugString( 'Word: ' );
		OutputDebugString( WordFromPoint[-1,-1,Null] );
	end
end;

with Expression1 do
begin
	Expression := 'value';
	SplitPaneHeight := 196;
	Background[EXPRESSIONLib_TLB.exVSplitterApp] := $f0f0f0;
	AllowSplitter := EXPRESSIONLib_TLB.exVSplitter;
end

VFP

*** Click event - Occurs when the user presses and then releases the left mouse button over the list control. ***
LPARAMETERS nop
	with thisform.Expression1
		DEBUGOUT( "Word: " )
		DEBUGOUT( .WordFromPoint(-1,-1) )
	endwith

with thisform.Expression1
	.Expression = "value"
	.SplitPaneHeight = 196
	.Object.Background(1) = RGB(240,240,240)
	.AllowSplitter = 2
endwith

dBASE Plus

/*
with (this.EXPRESSIONACTIVEXCONTROL1.nativeObject)
	Click = class::nativeObject_Click
endwith
*/
// Occurs when the user presses and then releases the left mouse button over the list control.
function nativeObject_Click()
	local oExpression
	oExpression = form.EXPRESSIONACTIVEXCONTROL1.nativeObject
	? "Word: " 
	? oExpression.WordFromPoint(-1,-1) 
return

local oExpression

oExpression = form.EXPRESSIONACTIVEXCONTROL1.nativeObject
oExpression.Expression = "value"
oExpression.SplitPaneHeight = 196
oExpression.Template = [Background(1) = 15790320] // oExpression.Background(1) = 0xf0f0f0
oExpression.AllowSplitter = 2

XBasic (Alpha Five)

' Occurs when the user presses and then releases the left mouse button over the list control.
function Click as v ()
	Dim oExpression as P
	oExpression = topparent:CONTROL_ACTIVEX1.activex
	? "Word: " 
	? oExpression.WordFromPoint(-1,-1) 
end function

Dim oExpression as P

oExpression = topparent:CONTROL_ACTIVEX1.activex
oExpression.Expression = "value"
oExpression.SplitPaneHeight = 196
oExpression.Template = "Background(1) = 15790320" // oExpression.Background(1) = 15790320
oExpression.AllowSplitter = 2

Visual Objects

METHOD OCX_Exontrol1Click() CLASS MainDialog
	// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
	OutputDebugString(String2Psz( "Word: " ))
	OutputDebugString(String2Psz( oDCOCX_Exontrol1:[WordFromPoint,-1,-1,nil] ))
RETURN NIL


oDCOCX_Exontrol1:Expression := "value"
oDCOCX_Exontrol1:SplitPaneHeight := 196
oDCOCX_Exontrol1:[Background,exVSplitterApp] := RGB(240,240,240)
oDCOCX_Exontrol1:AllowSplitter := exVSplitter

PowerBuilder

/*begin event Click() - Occurs when the user presses and then releases the left mouse button over the list control.*/
/*
	OleObject oExpression
	oExpression = ole_1.Object
	MessageBox("Information",string( "Word: " ))
	MessageBox("Information",string( oExpression.WordFromPoint(-1,-1) ))
*/
/*end event Click*/

OleObject oExpression

oExpression = ole_1.Object
oExpression.Expression = "value"
oExpression.SplitPaneHeight = 196
oExpression.Background(1,RGB(240,240,240))
oExpression.AllowSplitter = 2

Visual DataFlex

// Occurs when the user presses and then releases the left mouse button over the list control.
Procedure OnComClick 
	Forward Send OnComClick 
	Showln "Word: " (ComWordFromPoint(Self,-1,-1,Nothing))
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComExpression to "value"
	Set ComSplitPaneHeight to 196
	Set ComBackground OLEexVSplitterApp to (RGB(240,240,240))
	Set ComAllowSplitter to OLEexVSplitter
End_Procedure

XBase++

PROCEDURE OnClick(oExpression)
	DevOut( "Word: " )
	DevOut( oExpression:WordFromPoint(-1,-1) )
RETURN

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

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

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

	oExpression := XbpActiveXControl():new( oForm:drawingArea )
	oExpression:CLSID  := "Exontrol.Expression.1" /*{B33F5489-49AC-4155-98E7-9BBFC57FF019}*/
	oExpression:create(,, {10,60},{610,370} )

		oExpression:Click := {|| OnClick(oExpression)} /*Occurs when the user presses and then releases the left mouse button over the list control.*/

		oExpression:Expression := "value"
		oExpression:SplitPaneHeight := 196
		oExpression:SetProperty("Background",1/*exVSplitterApp*/,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oExpression:AllowSplitter := 2/*exVSplitter*/

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