event Change ()
Indicates that the control's text have changed.

TypeDescription

Use the Change event to notify you application that the user changes the text/expression in the control. Use the Text property to access the control's text/expression. The IsValid property indicates whether the control's expression is valid/syntactically correct. 

Syntax for Change event, /NET version, on:

private void Change(object sender)
{
}

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

Syntax for Change event, /COM version, on:

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

void OnChange()
{
}

void __fastcall Change(TObject *Sender)
{
}

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

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

begin event Change()
end event Change

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

Private Sub Change()
End Sub

Private Sub Change()
End Sub

LPARAMETERS nop

PROCEDURE OnChange(oExpression)
RETURN

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

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

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

Procedure OnComChange 
	Forward Send OnComChange 
End_Procedure

METHOD OCX_Change() CLASS MainDialog
RETURN NIL

void onEvent_Change()
{
}

function Change as v ()
end function

function nativeObject_Change()
return

The following sample shows how you can check if the expression is valid/syntactically correct.

VBA (MS Access, Excell...)

' Change event - Indicates that the control's text has changed.
Private Sub Expression1_Change()
	With Expression1
		Debug.Print( "Valid: " )
		Debug.Print( .IsValid )
	End With
End Sub

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

VB6

' Change event - Indicates that the control's text has changed.
Private Sub Expression1_Change()
	With Expression1
		Debug.Print( "Valid: " )
		Debug.Print( .IsValid )
	End With
End Sub

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

VB.NET

' Change event - Indicates that the control's text has changed.
Private Sub Expression1_Change(ByVal sender As System.Object) Handles Expression1.Change
	With Expression1
		Debug.Print( "Valid: " )
		Debug.Print( .IsValid )
	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

' Change event - Indicates that the control's text has changed.
Private Sub AxExpression1_Change(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxExpression1.Change
	With AxExpression1
		Debug.Print( "Valid: " )
		Debug.Print( .IsValid )
	End With
End Sub

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

C++

// Change event - Indicates that the control's text has changed.
void OnChangeExpression1()
{
	/*
		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"Valid: " );
	OutputDebugStringW( _bstr_t(spExpression1->GetIsValid()) );
}

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

// Change event - Indicates that the control's text has changed.
void __fastcall TForm1::Expression1Change(TObject *Sender)
{
	OutputDebugString( L"Valid: " );
	OutputDebugString( PChar(Expression1->IsValid) );
}

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

C#

// Change event - Indicates that the control's text has changed.
private void expression1_Change(object sender)
{
	System.Diagnostics.Debug.Print( "Valid: " );
	System.Diagnostics.Debug.Print( expression1.IsValid.ToString() );
}
//this.expression1.Change += new exontrol.EXPRESSIONLib.exg2antt.ChangeEventHandler(this.expression1_Change);

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="Change()" LANGUAGE="JScript">
	alert( "Valid: " );
	alert( Expression1.IsValid );
</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_Change()
	With Expression1
		alert( "Valid: " )
		alert( .IsValid )
	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

// Change event - Indicates that the control's text has changed.
private void axExpression1_Change(object sender, EventArgs e)
{
	System.Diagnostics.Debug.Print( "Valid: " );
	System.Diagnostics.Debug.Print( axExpression1.IsValid.ToString() );
}
//this.axExpression1.Change += new EventHandler(this.axExpression1_Change);

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)

// Change event - Indicates that the control's text has changed.
void onEvent_Change()
{
	;
	print( "Valid: " );
	print( expression1.IsValid() );
}

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)

// Change event - Indicates that the control's text has changed.
procedure TWinForm1.AxExpression1_Change(sender: System.Object; e: System.EventArgs);
begin
	with AxExpression1 do
	begin
		OutputDebugString( 'Valid: ' );
		OutputDebugString( IsValid );
	end
end;

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

Delphi (standard)

// Change event - Indicates that the control's text has changed.
procedure TForm1.Expression1Change(ASender: TObject; );
begin
	with Expression1 do
	begin
		OutputDebugString( 'Valid: ' );
		OutputDebugString( IsValid );
	end
end;

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

VFP

*** Change event - Indicates that the control's text has changed. ***
LPARAMETERS nop
	with thisform.Expression1
		DEBUGOUT( "Valid: " )
		DEBUGOUT( .IsValid )
	endwith

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

dBASE Plus

/*
with (this.EXPRESSIONACTIVEXCONTROL1.nativeObject)
	Change = class::nativeObject_Change
endwith
*/
// Indicates that the control's text has changed.
function nativeObject_Change()
	local oExpression
	oExpression = form.EXPRESSIONACTIVEXCONTROL1.nativeObject
	? "Valid: " 
	? Str(oExpression.IsValid) 
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)

' Indicates that the control's text has changed.
function Change as v ()
	Dim oExpression as P
	oExpression = topparent:CONTROL_ACTIVEX1.activex
	? "Valid: " 
	? oExpression.IsValid 
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_Exontrol1Change() CLASS MainDialog
	// Change event - Indicates that the control's text has changed.
	OutputDebugString(String2Psz( "Valid: " ))
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:IsValid) ))
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 Change() - Indicates that the control's text has changed.*/
/*
	OleObject oExpression
	oExpression = ole_1.Object
	MessageBox("Information",string( "Valid: " ))
	MessageBox("Information",string( String(oExpression.IsValid) ))
*/
/*end event Change*/

OleObject oExpression

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

Visual DataFlex

// Indicates that the control's text has changed.
Procedure OnComChange 
	Forward Send OnComChange 
	Showln "Valid: " (ComIsValid(Self))
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 OnChange(oExpression)
	DevOut( "Valid: " )
	DevOut( Transform(oExpression:IsValid(),"") )
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:Change := {|| OnChange(oExpression)} /*Indicates that the control's text has changed.*/

		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