property Items.ToString as String
Loads or saves the Items collection using string representation.

TypeDescription
String A String expression that specifies the comma-separated list of items to be displayed. If the list displayed multiple columns, the cells are separated by ; character. The () characters indicates the child collection.
The ToString property loads or saves the Item object using string representation. The Add / Count / Item.ToString / Items.ToString method adds a Item object(s) to the collection and returns a reference to the newly created object. The Value property specifies the cell's value. The HasCheckBox property retrieves or sets a value indicating whether the cell has a checkbox associated or not. The Items property returns the item's child collection. The Add method of the Columns object adds a new column to the list. The HasRadioButton property shows or hides the cell's radio-button. The RadioGroup property arranges multiple radio-buttons to the same group. The State property of the Item indicates the state of the radio-button. 

How can I add a hierarchy (multiple-columns), using the Item.ToString method?

VBA (MS Access, Excell...)

With TreeCube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree
		.LinesAtRoot = -1
		.Columns.Add(1).Alignment = 0
		.Columns.Add(2).Alignment = 0
		.Columns.Add(3).Alignment = 0
		.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3)," & _
"Child 1.2;Child 2.2;Child 3.2)"
		.Items.ExpandAll 
		Debug.Print( .Items.Item(0).ToString )
	End With
End With

VB6

With TreeCube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree
		.LinesAtRoot = exLinesAtRoot
		.Columns.Add(1).Alignment = LeftAlignment
		.Columns.Add(2).Alignment = LeftAlignment
		.Columns.Add(3).Alignment = LeftAlignment
		.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3)," & _
"Child 1.2;Child 2.2;Child 3.2)"
		.Items.ExpandAll 
		Debug.Print( .Items.Item(0).ToString )
	End With
End With

VB.NET

With Extreecube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree()
		.LinesAtRoot = exontrol.EXTREECUBELib.LinesAtRootEnum.exLinesAtRoot
		.Columns.Add(1).Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment
		.Columns.Add(2).Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment
		.Columns.Add(3).Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment
		.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3)," & _
"Child 1.2;Child 2.2;Child 3.2)"
		.Items.ExpandAll()
		Debug.Print( .Items.Item(0).ToString )
	End With
End With

VB.NET for /COM

With AxTreeCube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree()
		.LinesAtRoot = EXTREECUBELib.LinesAtRootEnum.exLinesAtRoot
		.Columns.Add(1).Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment
		.Columns.Add(2).Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment
		.Columns.Add(3).Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment
		.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3)," & _
"Child 1.2;Child 2.2;Child 3.2)"
		.Items.ExpandAll()
		Debug.Print( .Items.Item(0).ToString )
	End With
End With

C++

/*
	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();
spTreeCube1->PutTexturePicturePath(L"");
EXTREECUBELib::IFaceTreePtr var_FaceTree = spTreeCube1->GetFrontFace()->CreateTree();
	var_FaceTree->PutLinesAtRoot(EXTREECUBELib::exLinesAtRoot);
	var_FaceTree->GetColumns()->Add(L"1")->PutAlignment(EXTREECUBELib::LeftAlignment);
	var_FaceTree->GetColumns()->Add(L"2")->PutAlignment(EXTREECUBELib::LeftAlignment);
	var_FaceTree->GetColumns()->Add(L"3")->PutAlignment(EXTREECUBELib::LeftAlignment);
	var_FaceTree->GetItems()->PutToString(_bstr_t("Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),") +
"Child 1.2;Child 2.2;Child 3.2)");
	var_FaceTree->GetItems()->ExpandAll();
	OutputDebugStringW( var_FaceTree->GetItems()->GetItem(long(0))->GetToString() );

C++ Builder

TreeCube1->TexturePicturePath = L"";
Extreecubelib_tlb::IFaceTreePtr var_FaceTree = TreeCube1->FrontFace->CreateTree();
	var_FaceTree->LinesAtRoot = Extreecubelib_tlb::LinesAtRootEnum::exLinesAtRoot;
	var_FaceTree->Columns->Add(L"1")->Alignment = Extreecubelib_tlb::AlignmentEnum::LeftAlignment;
	var_FaceTree->Columns->Add(L"2")->Alignment = Extreecubelib_tlb::AlignmentEnum::LeftAlignment;
	var_FaceTree->Columns->Add(L"3")->Alignment = Extreecubelib_tlb::AlignmentEnum::LeftAlignment;
	var_FaceTree->Items->ToString = TVariant(String("Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),") +
"Child 1.2;Child 2.2;Child 3.2)");
	var_FaceTree->Items->ExpandAll();
	OutputDebugString( var_FaceTree->Items->get_Item(TVariant(0))->ToString );

C#

extreecube1.TexturePicturePath = "";
exontrol.EXTREECUBELib.FaceTree var_FaceTree = extreecube1.FrontFace.CreateTree();
	var_FaceTree.LinesAtRoot = exontrol.EXTREECUBELib.LinesAtRootEnum.exLinesAtRoot;
	var_FaceTree.Columns.Add(1.ToString()).Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment;
	var_FaceTree.Columns.Add(2.ToString()).Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment;
	var_FaceTree.Columns.Add(3.ToString()).Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment;
	var_FaceTree.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3)," +
"Child 1.2;Child 2.2;Child 3.2)";
	var_FaceTree.Items.ExpandAll();
	System.Diagnostics.Debug.Print( var_FaceTree.Items[0].ToString );

JScript/JavaScript

<BODY onload="Init()">
<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.LinesAtRoot = -1;
		var_FaceTree.Columns.Add(1).Alignment = 0;
		var_FaceTree.Columns.Add(2).Alignment = 0;
		var_FaceTree.Columns.Add(3).Alignment = 0;
		var_FaceTree.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3)," +
	"Child 1.2;Child 2.2;Child 3.2)";
		var_FaceTree.Items.ExpandAll();
		alert( var_FaceTree.Items.Item(0).ToString );
}
</SCRIPT>
</BODY>

VBScript

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

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With TreeCube1
		.TexturePicturePath = ""
		With .FrontFace.CreateTree
			.LinesAtRoot = -1
			.Columns.Add(1).Alignment = 0
			.Columns.Add(2).Alignment = 0
			.Columns.Add(3).Alignment = 0
			.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3)," & _
	"Child 1.2;Child 2.2;Child 3.2)"
			.Items.ExpandAll 
			alert( .Items.Item(0).ToString )
		End With
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

axTreeCube1.TexturePicturePath = "";
EXTREECUBELib.FaceTree var_FaceTree = axTreeCube1.FrontFace.CreateTree();
	var_FaceTree.LinesAtRoot = EXTREECUBELib.LinesAtRootEnum.exLinesAtRoot;
	var_FaceTree.Columns.Add(1.ToString()).Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment;
	var_FaceTree.Columns.Add(2.ToString()).Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment;
	var_FaceTree.Columns.Add(3.ToString()).Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment;
	var_FaceTree.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3)," +
"Child 1.2;Child 2.2;Child 3.2)";
	var_FaceTree.Items.ExpandAll();
	System.Diagnostics.Debug.Print( var_FaceTree.Items[0].ToString );

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_Column,com_Columns,com_FaceTree,com_Items;
	anytype var_Column,var_Columns,var_FaceTree,var_Items;
	str var_s;
	;

	super();

	extreecube1.TexturePicturePath("");
	var_FaceTree = extreecube1.FrontFace().CreateTree(); com_FaceTree = var_FaceTree;
		com_FaceTree.LinesAtRoot(-1/*exLinesAtRoot*/);
		var_Columns = COM::createFromObject(com_FaceTree.Columns()); com_Columns = var_Columns;
		var_Column = COM::createFromObject(com_Columns).Add(1); com_Column = var_Column;
		com_Column.Alignment(0/*LeftAlignment*/);
		var_Columns = COM::createFromObject(com_FaceTree.Columns()); com_Columns = var_Columns;
		var_Column = COM::createFromObject(com_Columns).Add(2); com_Column = var_Column;
		com_Column.Alignment(0/*LeftAlignment*/);
		var_Columns = COM::createFromObject(com_FaceTree.Columns()); com_Columns = var_Columns;
		var_Column = COM::createFromObject(com_Columns).Add(3); com_Column = var_Column;
		com_Column.Alignment(0/*LeftAlignment*/);
		var_Items = COM::createFromObject(com_FaceTree.Items()); com_Items = var_Items;
		var_s = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),C";
		var_s = var_s + "hild 1.2;Child 2.2;Child 3.2)";
		com_Items.ToString(var_s);
		var_Items = COM::createFromObject(com_FaceTree.Items()); com_Items = var_Items;
		com_Items.ExpandAll();
		print( com_FaceTree.Items().Item(COMVariant::createFromInt(0)).ToString() );
}

Delphi 8 (.NET only)

with AxTreeCube1 do
begin
	TexturePicturePath := '';
	with FrontFace.CreateTree() do
	begin
		LinesAtRoot := EXTREECUBELib.LinesAtRootEnum.exLinesAtRoot;
		Columns.Add(1).Alignment := EXTREECUBELib.AlignmentEnum.LeftAlignment;
		Columns.Add(2).Alignment := EXTREECUBELib.AlignmentEnum.LeftAlignment;
		Columns.Add(3).Alignment := EXTREECUBELib.AlignmentEnum.LeftAlignment;
		Items.ToString := 'Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),C' + 
	'hild 1.2;Child 2.2;Child 3.2)';
		Items.ExpandAll();
		OutputDebugString( Items.Item[TObject(0)].ToString );
	end;
end

Delphi (standard)

with TreeCube1 do
begin
	TexturePicturePath := '';
	with FrontFace.CreateTree() do
	begin
		LinesAtRoot := EXTREECUBELib_TLB.exLinesAtRoot;
		Columns.Add(1).Alignment := EXTREECUBELib_TLB.LeftAlignment;
		Columns.Add(2).Alignment := EXTREECUBELib_TLB.LeftAlignment;
		Columns.Add(3).Alignment := EXTREECUBELib_TLB.LeftAlignment;
		Items.ToString := 'Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),C' + 
	'hild 1.2;Child 2.2;Child 3.2)';
		Items.ExpandAll();
		OutputDebugString( Items.Item[OleVariant(0)].ToString );
	end;
end

VFP

with thisform.TreeCube1
	.TexturePicturePath = ""
	with .FrontFace.CreateTree
		.LinesAtRoot = -1
		.Columns.Add(1).Alignment = 0
		.Columns.Add(2).Alignment = 0
		.Columns.Add(3).Alignment = 0
		var_s = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),C"
		var_s = var_s + "hild 1.2;Child 2.2;Child 3.2)"
		.Items.ToString = var_s
		.Items.ExpandAll
		DEBUGOUT( .Items.Item(0).ToString )
	endwith
endwith

dBASE Plus

local oTreeCube,var_Column,var_Column1,var_Column2,var_FaceTree

oTreeCube = form.EXTREECUBEACTIVEXCONTROL1.nativeObject
oTreeCube.TexturePicturePath = ""
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.LinesAtRoot = -1
	// var_FaceTree.Columns.Add(Str(1)).Alignment = 0
	var_Column = var_FaceTree.Columns.Add(Str(1))
	with (oTreeCube)
		TemplateDef = [dim var_Column]
		TemplateDef = var_Column
		Template = [var_Column.Alignment = 0]
	endwith
	// var_FaceTree.Columns.Add(Str(2)).Alignment = 0
	var_Column1 = var_FaceTree.Columns.Add(Str(2))
	with (oTreeCube)
		TemplateDef = [dim var_Column1]
		TemplateDef = var_Column1
		Template = [var_Column1.Alignment = 0]
	endwith
	// var_FaceTree.Columns.Add(Str(3)).Alignment = 0
	var_Column2 = var_FaceTree.Columns.Add(Str(3))
	with (oTreeCube)
		TemplateDef = [dim var_Column2]
		TemplateDef = var_Column2
		Template = [var_Column2.Alignment = 0]
	endwith
	var_FaceTree.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),Child 1.2;Child 2.2;Child 3.2)"
	var_FaceTree.Items.ExpandAll()
	? var_FaceTree.Items.Item(0).ToString 

XBasic (Alpha Five)

Dim oTreeCube as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local
Dim var_FaceTree as P

oTreeCube = topparent:CONTROL_ACTIVEX1.activex
oTreeCube.TexturePicturePath = ""
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.LinesAtRoot = -1
	' var_FaceTree.Columns.Add(1).Alignment = 0
	var_Column = var_FaceTree.Columns.Add(1)
	oTreeCube.TemplateDef = "dim var_Column"
	oTreeCube.TemplateDef = var_Column
	oTreeCube.Template = "var_Column.Alignment = 0"

	' var_FaceTree.Columns.Add(2).Alignment = 0
	var_Column1 = var_FaceTree.Columns.Add(2)
	oTreeCube.TemplateDef = "dim var_Column1"
	oTreeCube.TemplateDef = var_Column1
	oTreeCube.Template = "var_Column1.Alignment = 0"

	' var_FaceTree.Columns.Add(3).Alignment = 0
	var_Column2 = var_FaceTree.Columns.Add(3)
	oTreeCube.TemplateDef = "dim var_Column2"
	oTreeCube.TemplateDef = var_Column2
	oTreeCube.Template = "var_Column2.Alignment = 0"

	var_FaceTree.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),Child 1.2;Child 2.2;Child 3.2)"
	var_FaceTree.Items.ExpandAll()
	? var_FaceTree.Items.Item(0).ToString 

Visual Objects

local var_FaceTree as IFaceTree

oDCOCX_Exontrol1:TexturePicturePath := ""
var_FaceTree := oDCOCX_Exontrol1:FrontFace:CreateTree()
	var_FaceTree:LinesAtRoot := exLinesAtRoot
	var_FaceTree:Columns:Add(AsString(1)):Alignment := LeftAlignment
	var_FaceTree:Columns:Add(AsString(2)):Alignment := LeftAlignment
	var_FaceTree:Columns:Add(AsString(3)):Alignment := LeftAlignment
	var_FaceTree:Items:ToString := "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),Child 1.2;Child 2.2;Child 3.2)"
	var_FaceTree:Items:ExpandAll()
	OutputDebugString(String2Psz( var_FaceTree:Items:[Item,0]:ToString ))

PowerBuilder

OleObject oTreeCube,var_FaceTree

oTreeCube = ole_1.Object
oTreeCube.TexturePicturePath = ""
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.LinesAtRoot = -1
	var_FaceTree.Columns.Add(String(1)).Alignment = 0
	var_FaceTree.Columns.Add(String(2)).Alignment = 0
	var_FaceTree.Columns.Add(String(3)).Alignment = 0
	var_FaceTree.Items.ToString = "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),Child 1.2;Child 2.2;Child 3.2)"
	var_FaceTree.Items.ExpandAll()
	MessageBox("Information",string( var_FaceTree.Items.Item(0).ToString ))

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Set ComTexturePicturePath to ""
	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 ComLinesAtRoot of hoFaceTree to OLEexLinesAtRoot
			Variant voColumns
			Get ComColumns of hoFaceTree to voColumns
			Handle hoColumns
			Get Create (RefClass(cComColumns)) to hoColumns
			Set pvComObject of hoColumns to voColumns
				Variant voColumn
				Get ComAdd of hoColumns 1 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 voColumns1
			Get ComColumns of hoFaceTree to voColumns1
			Handle hoColumns1
			Get Create (RefClass(cComColumns)) to hoColumns1
			Set pvComObject of hoColumns1 to voColumns1
				Variant voColumn1
				Get ComAdd of hoColumns1 2 to voColumn1
				Handle hoColumn1
				Get Create (RefClass(cComColumn)) to hoColumn1
				Set pvComObject of hoColumn1 to voColumn1
					Set ComAlignment of hoColumn1 to OLELeftAlignment
				Send Destroy to hoColumn1
			Send Destroy to hoColumns1
			Variant voColumns2
			Get ComColumns of hoFaceTree to voColumns2
			Handle hoColumns2
			Get Create (RefClass(cComColumns)) to hoColumns2
			Set pvComObject of hoColumns2 to voColumns2
				Variant voColumn2
				Get ComAdd of hoColumns2 3 to voColumn2
				Handle hoColumn2
				Get Create (RefClass(cComColumn)) to hoColumn2
				Set pvComObject of hoColumn2 to voColumn2
					Set ComAlignment of hoColumn2 to OLELeftAlignment
				Send Destroy to hoColumn2
			Send Destroy to hoColumns2
			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 "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),Child 1.2;Child 2.2;Child 3.2)"
			Send Destroy to hoItems
			Variant voItems1
			Get ComItems of hoFaceTree to voItems1
			Handle hoItems1
			Get Create (RefClass(cComItems)) to hoItems1
			Set pvComObject of hoItems1 to voItems1
				Send ComExpandAll of hoItems1
			Send Destroy to hoItems1
			Variant v
			Variant voItems2
			Get ComItems of hoFaceTree to voItems2
			Handle hoItems2
			Get Create (RefClass(cComItems)) to hoItems2
			Set pvComObject of hoItems2 to voItems2
				Variant voItem
				Get ComItem of hoItems2 0 to voItem
				Handle hoItem
				Get Create (RefClass(cComItem)) to hoItem
				Set pvComObject of hoItem to voItem
					Get ComToString of hoItem to v
				Send Destroy to hoItem
			Send Destroy to hoItems2
			Showln v
		Send Destroy to hoFaceTree
	Send Destroy to hoFace
End_Procedure

XBase++

#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:TexturePicturePath := ""
		oFaceTree := oTreeCube:FrontFace():CreateTree()
			oFaceTree:LinesAtRoot := -1/*exLinesAtRoot*/
			oFaceTree:Columns():Add(Transform(1,"")):Alignment := 0/*LeftAlignment*/
			oFaceTree:Columns():Add(Transform(2,"")):Alignment := 0/*LeftAlignment*/
			oFaceTree:Columns():Add(Transform(3,"")):Alignment := 0/*LeftAlignment*/
			oFaceTree:Items():ToString := "Root 1;Root 2;Root 3(Child1.1;Child2.1;Child3.1(SubChild 1.1;SubChild 2.1;SubChild 3.1,SubChild 2.1;SubChild 2.2;SubChild 2.3),Child 1.2;Child 2.2;Child 3.2)"
			oFaceTree:Items():ExpandAll()
			DevOut( oFaceTree:Items:Item(0):ToString() )

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