event FaceTreeStateChanged (Tree as FaceTree, Item as Long, Column as Long)
Notifies that a cell changes its state into a face of tree type.

TypeDescription
Tree as FaceTree A FaceTree object where the user changes the state of a check/radio button.
Item as Long A Long expression that indicates the index of the item that hosts the check/radio being changed.
Column as Long A Long expression that indicates the index of the column that hosts the check/radio being changed.
The FaceTreeStateChanged event notifies when the state of the check-box or a radio-button is changed. The Def(exCellHasCheckBox) property of the Column, assign check-boxes to all cells in the column. The PartialCheck property indicates whether the column supports three-state check-boxes ( unchecked, checked and partial states). The HasCheckBox property shows or hides the cell's check-box. The State property of the Item indicates the state of the check-box. The CheckBoxWidth / CheckBoxHeight property specifies the size of the check-box. The Background(exCheckBoxState0) / Background(exCheckBoxState1) / Background(exCheckBoxState2) property specifies the visual appearance of the check-box. The Def(exCellHasRadioButton) property of the Column, assign radio-buttons to all cells in the column. The HasRadioButton property shows or hides the cell's radio-button. The State property of the Item indicates the state of the radio-button. The RadioGroup property arranges multiple radio-buttons to the same group. The RadioButtonWidth / RadioButtonHeight property specifies the size of the radio-button. The Background(exRadioButtonState0) / Background(exRadioButtonState1) property specifies the visual appearance of the radio-button.

 

A face that contains a Tree control may fire any of the following events ( CreateTree, Type on exFaceTree ): 

Syntax for FaceTreeStateChanged event, /NET version, on:

private void FaceTreeStateChanged(object sender,exontrol.EXTREECUBELib.FaceTree   Tree,int   Item,int   Column)
{
}

Private Sub FaceTreeStateChanged(ByVal sender As System.Object,ByVal Tree As exontrol.EXTREECUBELib.FaceTree,ByVal Item As Integer,ByVal Column As Integer) Handles FaceTreeStateChanged
End Sub

Syntax for FaceTreeStateChanged event, /COM version, on:

private void FaceTreeStateChanged(object sender, AxEXTREECUBELib._ITreeCubeEvents_FaceTreeStateChangedEvent e)
{
}

void OnFaceTreeStateChanged(LPDISPATCH   Tree,long   Item,long   Column)
{
}

void __fastcall FaceTreeStateChanged(TObject *Sender,Extreecubelib_tlb::IFaceTree   *Tree,long   Item,long   Column)
{
}

procedure FaceTreeStateChanged(ASender: TObject; Tree : IFaceTree;Item : Integer;Column : Integer);
begin
end;

procedure FaceTreeStateChanged(sender: System.Object; e: AxEXTREECUBELib._ITreeCubeEvents_FaceTreeStateChangedEvent);
begin
end;

begin event FaceTreeStateChanged(oleobject  Tree,long  Item,long  Column)

end event FaceTreeStateChanged

Private Sub FaceTreeStateChanged(ByVal sender As System.Object, ByVal e As AxEXTREECUBELib._ITreeCubeEvents_FaceTreeStateChangedEvent) Handles FaceTreeStateChanged
End Sub

Private Sub FaceTreeStateChanged(ByVal Tree As EXTREECUBELibCtl.IFaceTree,ByVal Item As Long,ByVal Column As Long)
End Sub

Private Sub FaceTreeStateChanged(ByVal Tree As Object,ByVal Item As Long,ByVal Column As Long)
End Sub

LPARAMETERS Tree,Item,Column

PROCEDURE OnFaceTreeStateChanged(oTreeCube,Tree,Item,Column)

RETURN

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

<SCRIPT EVENT="FaceTreeStateChanged(Tree,Item,Column)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function FaceTreeStateChanged(Tree,Item,Column)
End Function
</SCRIPT>

Procedure OnComFaceTreeStateChanged Variant   llTree Integer   llItem Integer   llColumn
	Forward Send OnComFaceTreeStateChanged llTree llItem llColumn
End_Procedure

METHOD OCX_FaceTreeStateChanged(Tree,Item,Column) CLASS MainDialog
RETURN NIL

void onEvent_FaceTreeStateChanged(COM   _Tree,int   _Item,int   _Column)
{
}

function FaceTreeStateChanged as v (Tree  as  OLE::Exontrol.TreeCube.1::IFaceTree,Item  as  N,Column  as  N)
end function

function nativeObject_FaceTreeStateChanged(Tree,Item,Column)
return

How can I display a list of check-boxes?

VBA (MS Access, Excell...)

' FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
Private Sub TreeCube1_FaceTreeStateChanged(ByVal Tree As Object,ByVal Item As Long,ByVal Column As Long)
	With TreeCube1
		With .FrontFace.FaceTree.ItemByIndex(Item)
			Debug.Print( "State" )
			Debug.Print( .State(0) )
		End With
	End With
End Sub

With TreeCube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree
		.HeaderVisible = False
		.ItemPadding = 16
		.DrawGridLines = 0
		.Columns.Add("Check").Alignment = 0
		With .Items
			.Add("Check <b>1").HasCheckBox(0) = True
			.Add("Check <b>2").HasCheckBox(0) = True
			With .Add("Check <b>3")
				.HasCheckBox(0) = True
				.State(0) = 1
			End With
			.Add("Check <b>4").HasCheckBox(0) = True
		End With
	End With
End With

VB6

' FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
Private Sub TreeCube1_FaceTreeStateChanged(ByVal Tree As EXTREECUBELibCtl.IFaceTree,ByVal Item As Long,ByVal Column As Long)
	With TreeCube1
		With .FrontFace.FaceTree.ItemByIndex(Item)
			Debug.Print( "State" )
			Debug.Print( .State(0) )
		End With
	End With
End Sub

With TreeCube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree
		.HeaderVisible = False
		.ItemPadding = 16
		.DrawGridLines = exNoLines
		.Columns.Add("Check").Alignment = LeftAlignment
		With .Items
			.Add("Check <b>1").HasCheckBox(0) = True
			.Add("Check <b>2").HasCheckBox(0) = True
			With .Add("Check <b>3")
				.HasCheckBox(0) = True
				.State(0) = 1
			End With
			.Add("Check <b>4").HasCheckBox(0) = True
		End With
	End With
End With

VB.NET

' FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
Private Sub Extreecube1_FaceTreeStateChanged(ByVal sender As System.Object,ByVal Tree As exontrol.EXTREECUBELib.FaceTree,ByVal Item As Integer,ByVal Column As Integer) Handles Extreecube1.FaceTreeStateChanged
	With Extreecube1
		With .FrontFace.FaceTree.get_ItemByIndex(Item)
			Debug.Print( "State" )
			Debug.Print( .get_State(0) )
		End With
	End With
End Sub

With Extreecube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree()
		.HeaderVisible = False
		.ItemPadding = 16
		.DrawGridLines = exontrol.EXTREECUBELib.GridLinesEnum.exNoLines
		.Columns.Add("Check").Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment
		With .Items
			.Add("Check <b>1").set_HasCheckBox(0,True)
			.Add("Check <b>2").set_HasCheckBox(0,True)
			With .Add("Check <b>3")
				.set_HasCheckBox(0,True)
				.set_State(0,1)
			End With
			.Add("Check <b>4").set_HasCheckBox(0,True)
		End With
	End With
End With

VB.NET for /COM

' FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
Private Sub AxTreeCube1_FaceTreeStateChanged(ByVal sender As System.Object, ByVal e As AxEXTREECUBELib._ITreeCubeEvents_FaceTreeStateChangedEvent) Handles AxTreeCube1.FaceTreeStateChanged
	With AxTreeCube1
		With .FrontFace.FaceTree.ItemByIndex(e.item)
			Debug.Print( "State" )
			Debug.Print( .State(0) )
		End With
	End With
End Sub

With AxTreeCube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree()
		.HeaderVisible = False
		.ItemPadding = 16
		.DrawGridLines = EXTREECUBELib.GridLinesEnum.exNoLines
		.Columns.Add("Check").Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment
		With .Items
			.Add("Check <b>1").HasCheckBox(0) = True
			.Add("Check <b>2").HasCheckBox(0) = True
			With .Add("Check <b>3")
				.HasCheckBox(0) = True
				.State(0) = 1
			End With
			.Add("Check <b>4").HasCheckBox(0) = True
		End With
	End With
End With

C++

// FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
void OnFaceTreeStateChangedTreeCube1(LPDISPATCH   Tree,long   Item,long   Column)
{
	/*
		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();
	EXTREECUBELib::IItemPtr var_Item = spTreeCube1->GetFrontFace()->GetFaceTree()->GetItemByIndex(Item);
		OutputDebugStringW( L"State" );
		OutputDebugStringW( _bstr_t(var_Item->GetState(long(0))) );
}

EXTREECUBELib::ITreeCubePtr spTreeCube1 = GetDlgItem(IDC_TREECUBE1)->GetControlUnknown();
spTreeCube1->PutTexturePicturePath(L"");
EXTREECUBELib::IFaceTreePtr var_FaceTree = spTreeCube1->GetFrontFace()->CreateTree();
	var_FaceTree->PutHeaderVisible(VARIANT_FALSE);
	var_FaceTree->PutItemPadding(16);
	var_FaceTree->PutDrawGridLines(EXTREECUBELib::exNoLines);
	var_FaceTree->GetColumns()->Add(L"Check")->PutAlignment(EXTREECUBELib::LeftAlignment);
	EXTREECUBELib::IItemsPtr var_Items = var_FaceTree->GetItems();
		var_Items->Add("Check <b>1")->PutHasCheckBox(long(0),VARIANT_TRUE);
		var_Items->Add("Check <b>2")->PutHasCheckBox(long(0),VARIANT_TRUE);
		EXTREECUBELib::IItemPtr var_Item = var_Items->Add("Check <b>3");
			var_Item->PutHasCheckBox(long(0),VARIANT_TRUE);
			var_Item->PutState(long(0),1);
		var_Items->Add("Check <b>4")->PutHasCheckBox(long(0),VARIANT_TRUE);

C++ Builder

// FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
void __fastcall TForm1::TreeCube1FaceTreeStateChanged(TObject *Sender,Extreecubelib_tlb::IFaceTree   *Tree,long   Item,long   Column)
{
	Extreecubelib_tlb::IItemPtr var_Item = TreeCube1->FrontFace->FaceTree->get_ItemByIndex(Item);
		OutputDebugString( L"State" );
		OutputDebugString( PChar(var_Item->get_State(TVariant(0))) );
}

TreeCube1->TexturePicturePath = L"";
Extreecubelib_tlb::IFaceTreePtr var_FaceTree = TreeCube1->FrontFace->CreateTree();
	var_FaceTree->HeaderVisible = false;
	var_FaceTree->ItemPadding = 16;
	var_FaceTree->DrawGridLines = Extreecubelib_tlb::GridLinesEnum::exNoLines;
	var_FaceTree->Columns->Add(L"Check")->Alignment = Extreecubelib_tlb::AlignmentEnum::LeftAlignment;
	Extreecubelib_tlb::IItemsPtr var_Items = var_FaceTree->Items;
		var_Items->Add(TVariant("Check <b>1"))->set_HasCheckBox(TVariant(0),true);
		var_Items->Add(TVariant("Check <b>2"))->set_HasCheckBox(TVariant(0),true);
		Extreecubelib_tlb::IItemPtr var_Item = var_Items->Add(TVariant("Check <b>3"));
			var_Item->set_HasCheckBox(TVariant(0),true);
			var_Item->set_State(TVariant(0),1);
		var_Items->Add(TVariant("Check <b>4"))->set_HasCheckBox(TVariant(0),true);

C#

// FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
private void extreecube1_FaceTreeStateChanged(object sender,exontrol.EXTREECUBELib.FaceTree   Tree,int   Item,int   Column)
{
	exontrol.EXTREECUBELib.Item var_Item = extreecube1.FrontFace.FaceTree.get_ItemByIndex(Item);
		System.Diagnostics.Debug.Print( "State" );
		System.Diagnostics.Debug.Print( var_Item.get_State(0).ToString() );
}
//this.extreecube1.FaceTreeStateChanged += new exontrol.EXTREECUBELib.exg2antt.FaceTreeStateChangedEventHandler(this.extreecube1_FaceTreeStateChanged);

extreecube1.TexturePicturePath = "";
exontrol.EXTREECUBELib.FaceTree var_FaceTree = extreecube1.FrontFace.CreateTree();
	var_FaceTree.HeaderVisible = false;
	var_FaceTree.ItemPadding = 16;
	var_FaceTree.DrawGridLines = exontrol.EXTREECUBELib.GridLinesEnum.exNoLines;
	var_FaceTree.Columns.Add("Check").Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment;
	exontrol.EXTREECUBELib.Items var_Items = var_FaceTree.Items;
		var_Items.Add("Check <b>1").set_HasCheckBox(0,true);
		var_Items.Add("Check <b>2").set_HasCheckBox(0,true);
		exontrol.EXTREECUBELib.Item var_Item = var_Items.Add("Check <b>3");
			var_Item.set_HasCheckBox(0,true);
			var_Item.set_State(0,1);
		var_Items.Add("Check <b>4").set_HasCheckBox(0,true);

JScript/JavaScript

<BODY onload="Init()">
<SCRIPT FOR="TreeCube1" EVENT="FaceTreeStateChanged(Tree,Item,Column)" LANGUAGE="JScript">
	var var_Item = TreeCube1.FrontFace.FaceTree.ItemByIndex(Item);
		alert( "State" );
		alert( var_Item.State(0) );
</SCRIPT>

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

<SCRIPT LANGUAGE="JScript">
function Init()
{
	TreeCube1.TexturePicturePath = "";
	var var_FaceTree = TreeCube1.FrontFace.CreateTree();
		var_FaceTree.HeaderVisible = false;
		var_FaceTree.ItemPadding = 16;
		var_FaceTree.DrawGridLines = 0;
		var_FaceTree.Columns.Add("Check").Alignment = 0;
		var var_Items = var_FaceTree.Items;
			var_Items.Add("Check <b>1").HasCheckBox(0) = true;
			var_Items.Add("Check <b>2").HasCheckBox(0) = true;
			var var_Item = var_Items.Add("Check <b>3");
				var_Item.HasCheckBox(0) = true;
				var_Item.State(0) = 1;
			var_Items.Add("Check <b>4").HasCheckBox(0) = true;
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function TreeCube1_FaceTreeStateChanged(Tree,Item,Column)
	With TreeCube1
		With .FrontFace.FaceTree.ItemByIndex(Item)
			alert( "State" )
			alert( .State(0) )
		End With
	End With
End Function
</SCRIPT>

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With TreeCube1
		.TexturePicturePath = ""
		With .FrontFace.CreateTree
			.HeaderVisible = False
			.ItemPadding = 16
			.DrawGridLines = 0
			.Columns.Add("Check").Alignment = 0
			With .Items
				.Add("Check <b>1").HasCheckBox(0) = True
				.Add("Check <b>2").HasCheckBox(0) = True
				With .Add("Check <b>3")
					.HasCheckBox(0) = True
					.State(0) = 1
				End With
				.Add("Check <b>4").HasCheckBox(0) = True
			End With
		End With
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

// FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
private void axTreeCube1_FaceTreeStateChanged(object sender, AxEXTREECUBELib._ITreeCubeEvents_FaceTreeStateChangedEvent e)
{
	EXTREECUBELib.Item var_Item = axTreeCube1.FrontFace.FaceTree.get_ItemByIndex(e.item);
		System.Diagnostics.Debug.Print( "State" );
		System.Diagnostics.Debug.Print( var_Item.get_State(0).ToString() );
}
//this.axTreeCube1.FaceTreeStateChanged += new AxEXTREECUBELib._ITreeCubeEvents_FaceTreeStateChangedEventHandler(this.axTreeCube1_FaceTreeStateChanged);

axTreeCube1.TexturePicturePath = "";
EXTREECUBELib.FaceTree var_FaceTree = axTreeCube1.FrontFace.CreateTree();
	var_FaceTree.HeaderVisible = false;
	var_FaceTree.ItemPadding = 16;
	var_FaceTree.DrawGridLines = EXTREECUBELib.GridLinesEnum.exNoLines;
	var_FaceTree.Columns.Add("Check").Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment;
	EXTREECUBELib.Items var_Items = var_FaceTree.Items;
		var_Items.Add("Check <b>1").set_HasCheckBox(0,true);
		var_Items.Add("Check <b>2").set_HasCheckBox(0,true);
		EXTREECUBELib.Item var_Item = var_Items.Add("Check <b>3");
			var_Item.set_HasCheckBox(0,true);
			var_Item.set_State(0,1);
		var_Items.Add("Check <b>4").set_HasCheckBox(0,true);

X++ (Dynamics Ax 2009)

// FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
void onEvent_FaceTreeStateChanged(COM   _Tree,int   _Item,int   _Column)
{
	COM com_Item;
	anytype var_Item;
	;
	var_Item = COM::createFromObject(extreecube1.FrontFace().FaceTree()).ItemByIndex(_Item); com_Item = var_Item;
		print( "State" );
		print( com_Item.State(COMVariant::createFromInt(0)) );
}

public void init()
{
	COM com_Column,com_Columns,com_FaceTree,com_Item,com_Item1,com_Items;
	anytype var_Column,var_Columns,var_FaceTree,var_Item,var_Item1,var_Items;
	;

	super();

	extreecube1.TexturePicturePath("");
	var_FaceTree = extreecube1.FrontFace().CreateTree(); com_FaceTree = var_FaceTree;
		com_FaceTree.HeaderVisible(false);
		com_FaceTree.ItemPadding(16);
		com_FaceTree.DrawGridLines(0/*exNoLines*/);
		var_Columns = COM::createFromObject(com_FaceTree.Columns()); com_Columns = var_Columns;
		var_Column = COM::createFromObject(com_Columns).Add("Check"); com_Column = var_Column;
		com_Column.Alignment(0/*LeftAlignment*/);
		var_Items = com_FaceTree.Items(); com_Items = var_Items;
			var_Item = COM::createFromObject(com_Items.Add("Check <b>1")); com_Item = var_Item;
			com_Item.HasCheckBox(COMVariant::createFromInt(0),true);
			var_Item = COM::createFromObject(com_Items.Add("Check <b>2")); com_Item = var_Item;
			com_Item.HasCheckBox(COMVariant::createFromInt(0),true);
			var_Item = com_Items.Add("Check <b>3"); com_Item = var_Item;
				com_Item.HasCheckBox(COMVariant::createFromInt(0),true);
				com_Item.State(COMVariant::createFromInt(0),1);
			var_Item1 = COM::createFromObject(com_Items.Add("Check <b>4")); com_Item1 = var_Item1;
			com_Item1.HasCheckBox(COMVariant::createFromInt(0),true);
}

Delphi 8 (.NET only)

// FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
procedure TWinForm1.AxTreeCube1_FaceTreeStateChanged(sender: System.Object; e: AxEXTREECUBELib._ITreeCubeEvents_FaceTreeStateChangedEvent);
begin
	with AxTreeCube1 do
	begin
		with FrontFace.FaceTree.ItemByIndex[e.item] do
		begin
			OutputDebugString( 'State' );
			OutputDebugString( State[TObject(0)] );
		end;
	end
end;

with AxTreeCube1 do
begin
	TexturePicturePath := '';
	with FrontFace.CreateTree() do
	begin
		HeaderVisible := False;
		ItemPadding := 16;
		DrawGridLines := EXTREECUBELib.GridLinesEnum.exNoLines;
		Columns.Add('Check').Alignment := EXTREECUBELib.AlignmentEnum.LeftAlignment;
		with Items do
		begin
			Add('Check <b>1').HasCheckBox[TObject(0)] := True;
			Add('Check <b>2').HasCheckBox[TObject(0)] := True;
			with Add('Check <b>3') do
			begin
				HasCheckBox[TObject(0)] := True;
				State[TObject(0)] := 1;
			end;
			Add('Check <b>4').HasCheckBox[TObject(0)] := True;
		end;
	end;
end

Delphi (standard)

// FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
procedure TForm1.TreeCube1FaceTreeStateChanged(ASender: TObject; Tree : IFaceTree;Item : Integer;Column : Integer);
begin
	with TreeCube1 do
	begin
		with FrontFace.FaceTree.ItemByIndex[Item] do
		begin
			OutputDebugString( 'State' );
			OutputDebugString( State[OleVariant(0)] );
		end;
	end
end;

with TreeCube1 do
begin
	TexturePicturePath := '';
	with FrontFace.CreateTree() do
	begin
		HeaderVisible := False;
		ItemPadding := 16;
		DrawGridLines := EXTREECUBELib_TLB.exNoLines;
		Columns.Add('Check').Alignment := EXTREECUBELib_TLB.LeftAlignment;
		with Items do
		begin
			Add('Check <b>1').HasCheckBox[OleVariant(0)] := True;
			Add('Check <b>2').HasCheckBox[OleVariant(0)] := True;
			with Add('Check <b>3') do
			begin
				HasCheckBox[OleVariant(0)] := True;
				State[OleVariant(0)] := 1;
			end;
			Add('Check <b>4').HasCheckBox[OleVariant(0)] := True;
		end;
	end;
end

VFP

*** FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type. ***
LPARAMETERS Tree,Item,Column
	with thisform.TreeCube1
		with .FrontFace.FaceTree.ItemByIndex(Item)
			DEBUGOUT( "State" )
			DEBUGOUT( .State(0) )
		endwith
	endwith

with thisform.TreeCube1
	.TexturePicturePath = ""
	with .FrontFace.CreateTree
		.HeaderVisible = .F.
		.ItemPadding = 16
		.DrawGridLines = 0
		.Columns.Add("Check").Alignment = 0
		with .Items
			.Add("Check <b>1").HasCheckBox(0) = .T.
			.Add("Check <b>2").HasCheckBox(0) = .T.
			with .Add("Check <b>3")
				.HasCheckBox(0) = .T.
				.State(0) = 1
			endwith
			.Add("Check <b>4").HasCheckBox(0) = .T.
		endwith
	endwith
endwith

dBASE Plus

/*
with (this.EXTREECUBEACTIVEXCONTROL1.nativeObject)
	FaceTreeStateChanged = class::nativeObject_FaceTreeStateChanged
endwith
*/
// Notifies that a cell changes its state into a face of tree type.
function nativeObject_FaceTreeStateChanged(Tree,Item,Column)
	local var_Item
	oTreeCube = form.EXTREECUBEACTIVEXCONTROL1.nativeObject
	var_Item = oTreeCube.FrontFace.FaceTree.ItemByIndex(Item)
		? "State" 
		? Str(var_Item.State(0)) 
return

local oTreeCube,var_Column,var_FaceTree,var_Item,var_Item1,var_Item2,var_Item3,var_Items

oTreeCube = form.EXTREECUBEACTIVEXCONTROL1.nativeObject
oTreeCube.TexturePicturePath = ""
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.HeaderVisible = false
	var_FaceTree.ItemPadding = 16
	var_FaceTree.DrawGridLines = 0
	// var_FaceTree.Columns.Add("Check").Alignment = 0
	var_Column = var_FaceTree.Columns.Add("Check")
	with (oTreeCube)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Alignment = 0]
	endwith
	var_Items = var_FaceTree.Items
		// var_Items.Add("Check <b>1").HasCheckBox(0) = true
		var_Item = var_Items.Add("Check <b>1")
		with (oTreeCube)
			TemplateDef = [dim var_Item]
			TemplateDef = var_Item
			Template = [var_Item.HasCheckBox(0) = True]
		endwith
		// var_Items.Add("Check <b>2").HasCheckBox(0) = true
		var_Item1 = var_Items.Add("Check <b>2")
		with (oTreeCube)
			TemplateDef = [dim var_Item1]
			TemplateDef = var_Item1
			Template = [var_Item1.HasCheckBox(0) = True]
		endwith
		var_Item2 = var_Items.Add("Check <b>3")
			// var_Item2.HasCheckBox(0) = true
			with (oTreeCube)
				TemplateDef = [dim var_Item2]
				TemplateDef = var_Item2
				Template = [var_Item2.HasCheckBox(0) = True]
			endwith
			// var_Item2.State(0) = 1
			with (oTreeCube)
				TemplateDef = [dim var_Item2]
				TemplateDef = var_Item2
				Template = [var_Item2.State(0) = 1]
			endwith
		// var_Items.Add("Check <b>4").HasCheckBox(0) = true
		var_Item3 = var_Items.Add("Check <b>4")
		with (oTreeCube)
			TemplateDef = [dim var_Item3]
			TemplateDef = var_Item3
			Template = [var_Item3.HasCheckBox(0) = True]
		endwith

XBasic (Alpha Five)

' Notifies that a cell changes its state into a face of tree type.
function FaceTreeStateChanged as v (Tree  as  OLE::Exontrol.TreeCube.1::IFaceTree,Item  as  N,Column  as  N)
	Dim var_Item as P
	oTreeCube = topparent:CONTROL_ACTIVEX1.activex
	var_Item = oTreeCube.FrontFace.FaceTree.ItemByIndex(Item)
		? "State" 
		? var_Item.State(0) 
end function

Dim oTreeCube as P
Dim var_Column as local
Dim var_FaceTree as P
Dim var_Item as local
Dim var_Item1 as local
Dim var_Item2 as P
Dim var_Item3 as local
Dim var_Items as P

oTreeCube = topparent:CONTROL_ACTIVEX1.activex
oTreeCube.TexturePicturePath = ""
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.HeaderVisible = .f.
	var_FaceTree.ItemPadding = 16
	var_FaceTree.DrawGridLines = 0
	' var_FaceTree.Columns.Add("Check").Alignment = 0
	var_Column = var_FaceTree.Columns.Add("Check")
	oTreeCube.TemplateDef = "dim var_Column"
	oTreeCube.TemplateDef = var_Column
	oTreeCube.Template = "var_Column.Alignment = 0"

	var_Items = var_FaceTree.Items
		' var_Items.Add("Check <b>1").HasCheckBox(0) = .t.
		var_Item = var_Items.Add("Check <b>1")
		oTreeCube.TemplateDef = "dim var_Item"
		oTreeCube.TemplateDef = var_Item
		oTreeCube.Template = "var_Item.HasCheckBox(0) = True"

		' var_Items.Add("Check <b>2").HasCheckBox(0) = .t.
		var_Item1 = var_Items.Add("Check <b>2")
		oTreeCube.TemplateDef = "dim var_Item1"
		oTreeCube.TemplateDef = var_Item1
		oTreeCube.Template = "var_Item1.HasCheckBox(0) = True"

		var_Item2 = var_Items.Add("Check <b>3")
			' var_Item2.HasCheckBox(0) = .t.
			oTreeCube.TemplateDef = "dim var_Item2"
			oTreeCube.TemplateDef = var_Item2
			oTreeCube.Template = "var_Item2.HasCheckBox(0) = True"

			' var_Item2.State(0) = 1
			oTreeCube.TemplateDef = "dim var_Item2"
			oTreeCube.TemplateDef = var_Item2
			oTreeCube.Template = "var_Item2.State(0) = 1"

		' var_Items.Add("Check <b>4").HasCheckBox(0) = .t.
		var_Item3 = var_Items.Add("Check <b>4")
		oTreeCube.TemplateDef = "dim var_Item3"
		oTreeCube.TemplateDef = var_Item3
		oTreeCube.Template = "var_Item3.HasCheckBox(0) = True"


Visual Objects

METHOD OCX_Exontrol1FaceTreeStateChanged(Tree,Item,Column) CLASS MainDialog
	// FaceTreeStateChanged event - Notifies that a cell changes its state into a face of tree type.
	local var_Item as IItem
	var_Item := oDCOCX_Exontrol1:FrontFace:FaceTree:[ItemByIndex,Item]
		OutputDebugString(String2Psz( "State" ))
		OutputDebugString(String2Psz( AsString(var_Item:[State,0]) ))
RETURN NIL

local var_FaceTree as IFaceTree
local var_Item as IItem
local var_Items as IItems

oDCOCX_Exontrol1:TexturePicturePath := ""
var_FaceTree := oDCOCX_Exontrol1:FrontFace:CreateTree()
	var_FaceTree:HeaderVisible := false
	var_FaceTree:ItemPadding := 16
	var_FaceTree:DrawGridLines := exNoLines
	var_FaceTree:Columns:Add("Check"):Alignment := LeftAlignment
	var_Items := var_FaceTree:Items
		var_Items:Add("Check <b>1"):[HasCheckBox,0] := true
		var_Items:Add("Check <b>2"):[HasCheckBox,0] := true
		var_Item := var_Items:Add("Check <b>3")
			var_Item:[HasCheckBox,0] := true
			var_Item:[State,0] := 1
		var_Items:Add("Check <b>4"):[HasCheckBox,0] := true

PowerBuilder

/*begin event FaceTreeStateChanged(oleobject  Tree,long  Item,long  Column) - Notifies that a cell changes its state into a face of tree type.*/
/*
	OleObject var_Item
	oTreeCube = ole_1.Object
	var_Item = oTreeCube.FrontFace.FaceTree.ItemByIndex(Item)
		MessageBox("Information",string( "State" ))
		MessageBox("Information",string( String(var_Item.State(0)) ))
*/
/*end event FaceTreeStateChanged*/

OleObject oTreeCube,var_FaceTree,var_Item,var_Items

oTreeCube = ole_1.Object
oTreeCube.TexturePicturePath = ""
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.HeaderVisible = false
	var_FaceTree.ItemPadding = 16
	var_FaceTree.DrawGridLines = 0
	var_FaceTree.Columns.Add("Check").Alignment = 0
	var_Items = var_FaceTree.Items
		var_Items.Add("Check <b>1").HasCheckBox(0,true)
		var_Items.Add("Check <b>2").HasCheckBox(0,true)
		var_Item = var_Items.Add("Check <b>3")
			var_Item.HasCheckBox(0,true)
			var_Item.State(0,1)
		var_Items.Add("Check <b>4").HasCheckBox(0,true)

Visual DataFlex

// Notifies that a cell changes its state into a face of tree type.
Procedure OnComFaceTreeStateChanged Variant   llTree Integer   llItem Integer   llColumn
	Forward Send OnComFaceTreeStateChanged llTree llItem llColumn
	Variant voFace
	Get ComFrontFace to voFace
	Handle hoFace
	Get Create (RefClass(cComFace)) to hoFace
	Set pvComObject of hoFace to voFace
		Variant voFaceTree
		Get ComFaceTree of hoFace to voFaceTree
		Handle hoFaceTree
		Get Create (RefClass(cComFaceTree)) to hoFaceTree
		Set pvComObject of hoFaceTree to voFaceTree
			Variant voItem
			Get ComItemByIndex of hoFaceTree llItem to voItem
			Handle hoItem
			Get Create (RefClass(cComItem)) to hoItem
			Set pvComObject of hoItem to voItem
				Showln "State" (ComState(hoItem,0))
			Send Destroy to hoItem
		Send Destroy to hoFaceTree
	Send Destroy to hoFace
End_Procedure

Procedure OnCreate
	Forward Send OnCreate
	Set ComTexturePicturePath to ""
	Variant voFace1
	Get ComFrontFace to voFace1
	Handle hoFace1
	Get Create (RefClass(cComFace)) to hoFace1
	Set pvComObject of hoFace1 to voFace1
		Variant voFaceTree1
		Get ComCreateTree of hoFace1 to voFaceTree1
		Handle hoFaceTree1
		Get Create (RefClass(cComFaceTree)) to hoFaceTree1
		Set pvComObject of hoFaceTree1 to voFaceTree1
			Set ComHeaderVisible of hoFaceTree1 to False
			Set ComItemPadding of hoFaceTree1 to 16
			Set ComDrawGridLines of hoFaceTree1 to OLEexNoLines
			Variant voColumns
			Get ComColumns of hoFaceTree1 to voColumns
			Handle hoColumns
			Get Create (RefClass(cComColumns)) to hoColumns
			Set pvComObject of hoColumns to voColumns
				Variant voColumn
				Get ComAdd of hoColumns "Check" to voColumn
				Handle hoColumn
				Get Create (RefClass(cComColumn)) to hoColumn
				Set pvComObject of hoColumn to voColumn
					Set ComAlignment of hoColumn to OLELeftAlignment
				Send Destroy to hoColumn
			Send Destroy to hoColumns
			Variant voItems
			Get ComItems of hoFaceTree1 to voItems
			Handle hoItems
			Get Create (RefClass(cComItems)) to hoItems
			Set pvComObject of hoItems to voItems
				Variant voItem1
				Get ComAdd of hoItems "Check <b>1" to voItem1
				Handle hoItem1
				Get Create (RefClass(cComItem)) to hoItem1
				Set pvComObject of hoItem1 to voItem1
					Set ComHasCheckBox of hoItem1 0 to True
				Send Destroy to hoItem1
				Variant voItem2
				Get ComAdd of hoItems "Check <b>2" to voItem2
				Handle hoItem2
				Get Create (RefClass(cComItem)) to hoItem2
				Set pvComObject of hoItem2 to voItem2
					Set ComHasCheckBox of hoItem2 0 to True
				Send Destroy to hoItem2
				Variant voItem3
				Get ComAdd of hoItems "Check <b>3" to voItem3
				Handle hoItem3
				Get Create (RefClass(cComItem)) to hoItem3
				Set pvComObject of hoItem3 to voItem3
					Set ComHasCheckBox of hoItem3 0 to True
					Set ComState of hoItem3 0 to 1
				Send Destroy to hoItem3
				Variant voItem4
				Get ComAdd of hoItems "Check <b>4" to voItem4
				Handle hoItem4
				Get Create (RefClass(cComItem)) to hoItem4
				Set pvComObject of hoItem4 to voItem4
					Set ComHasCheckBox of hoItem4 0 to True
				Send Destroy to hoItem4
			Send Destroy to hoItems
		Send Destroy to hoFaceTree1
	Send Destroy to hoFace1
End_Procedure

XBase++

PROCEDURE OnFaceTreeStateChanged(oTreeCube,Tree,Item,Column)
	LOCAL oItem
	oItem := oTreeCube:FrontFace():FaceTree():ItemByIndex(Item)
		DevOut( "State" )
		DevOut( Transform(oItem:State(0),"") )
RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oFaceTree
	LOCAL oItem
	LOCAL oItems
	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:FaceTreeStateChanged := {|Tree,Item,Column| OnFaceTreeStateChanged(oTreeCube,Tree,Item,Column)} /*Notifies that a cell changes its state into a face of tree type.*/

		oTreeCube:TexturePicturePath := ""
		oFaceTree := oTreeCube:FrontFace():CreateTree()
			oFaceTree:HeaderVisible := .F.
			oFaceTree:ItemPadding := 16
			oFaceTree:DrawGridLines := 0/*exNoLines*/
			oFaceTree:Columns():Add("Check"):Alignment := 0/*LeftAlignment*/
			oItems := oFaceTree:Items()
				oItems:Add("Check <b>1"):SetProperty("HasCheckBox",0,.T.)
				oItems:Add("Check <b>2"):SetProperty("HasCheckBox",0,.T.)
				oItem := oItems:Add("Check <b>3")
					oItem:SetProperty("HasCheckBox",0,.T.)
					oItem:SetProperty("State",0,1)
				oItems:Add("Check <b>4"):SetProperty("HasCheckBox",0,.T.)

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