Type | Description | |||
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. |
How can I add a hierarchy (single column), using the Item.ToString method?
VBA (MS Access, Excell...)
With TreeCube1 .TexturePicturePath = "" With .FrontFace.CreateTree .LinesAtRoot = -1 .Columns.Add("").Alignment = 0 .Items.Count = 1 .Items.Item(0).ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)" .Items.ExpandAll Debug.Print( .Items.Item(0).ToString ) End With End With
VB6
With TreeCube1 .TexturePicturePath = "" With .FrontFace.CreateTree .LinesAtRoot = exLinesAtRoot .Columns.Add("").Alignment = LeftAlignment .Items.Count = 1 .Items.Item(0).ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)" .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("").Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment .Items.Count = 1 .Items.Item(0).ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)" .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("").Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment .Items.Count = 1 .Items.Item(0).ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)" .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"")->PutAlignment(EXTREECUBELib::LeftAlignment); var_FaceTree->GetItems()->PutCount(1); var_FaceTree->GetItems()->GetItem(long(0))->PutToString(L"Root(Child1(SubChild 1,SubChild 2),Child2)"); 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"")->Alignment = Extreecubelib_tlb::AlignmentEnum::LeftAlignment; var_FaceTree->Items->Count = 1; var_FaceTree->Items->get_Item(TVariant(0))->ToString = L"Root(Child1(SubChild 1,SubChild 2),Child2)"; 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("").Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment; var_FaceTree.Items.Count = 1; var_FaceTree.Items[0].ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)"; 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("").Alignment = 0; var_FaceTree.Items.Count = 1; var_FaceTree.Items.Item(0).ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)"; 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("").Alignment = 0 .Items.Count = 1 .Items.Item(0).ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)" .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("").Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment; var_FaceTree.Items.Count = 1; var_FaceTree.Items[0].ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)"; 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_Item,com_Items; anytype var_Column,var_Columns,var_FaceTree,var_Item,var_Items; ; 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(""); com_Column = var_Column; com_Column.Alignment(0/*LeftAlignment*/); var_Items = COM::createFromObject(com_FaceTree.Items()); com_Items = var_Items; com_Items.Count(1); var_Item = COM::createFromObject(com_FaceTree.Items()).Item(COMVariant::createFromInt(0)); com_Item = var_Item; com_Item.ToString("Root(Child1(SubChild 1,SubChild 2),Child2)"); 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('').Alignment := EXTREECUBELib.AlignmentEnum.LeftAlignment; Items.Count := 1; Items.Item[TObject(0)].ToString := 'Root(Child1(SubChild 1,SubChild 2),Child2)'; 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('').Alignment := EXTREECUBELib_TLB.LeftAlignment; Items.Count := 1; Items.Item[OleVariant(0)].ToString := 'Root(Child1(SubChild 1,SubChild 2),Child2)'; Items.ExpandAll(); OutputDebugString( Items.Item[OleVariant(0)].ToString ); end; end
VFP
with thisform.TreeCube1 .TexturePicturePath = "" with .FrontFace.CreateTree .LinesAtRoot = -1 .Columns.Add("").Alignment = 0 .Items.Count = 1 .Items.Item(0).ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)" .Items.ExpandAll DEBUGOUT( .Items.Item(0).ToString ) endwith endwith
dBASE Plus
local oTreeCube,var_Column,var_FaceTree oTreeCube = form.EXTREECUBEACTIVEXCONTROL1.nativeObject oTreeCube.TexturePicturePath = "" var_FaceTree = oTreeCube.FrontFace.CreateTree() var_FaceTree.LinesAtRoot = -1 // var_FaceTree.Columns.Add("").Alignment = 0 var_Column = var_FaceTree.Columns.Add("") with (oTreeCube) TemplateDef = [dim var_Column] TemplateDef = var_Column Template = [var_Column.Alignment = 0] endwith var_FaceTree.Items.Count = 1 var_FaceTree.Items.Item(0).ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)" var_FaceTree.Items.ExpandAll() ? var_FaceTree.Items.Item(0).ToString
XBasic (Alpha Five)
Dim oTreeCube as P Dim var_Column 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("").Alignment = 0 var_Column = var_FaceTree.Columns.Add("") oTreeCube.TemplateDef = "dim var_Column" oTreeCube.TemplateDef = var_Column oTreeCube.Template = "var_Column.Alignment = 0" var_FaceTree.Items.Count = 1 var_FaceTree.Items.Item(0).ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)" 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(""):Alignment := LeftAlignment var_FaceTree:Items:Count := 1 var_FaceTree:Items:[Item,0]:ToString := "Root(Child1(SubChild 1,SubChild 2),Child2)" 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("").Alignment = 0 var_FaceTree.Items.Count = 1 var_FaceTree.Items.Item(0).ToString = "Root(Child1(SubChild 1,SubChild 2),Child2)" 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 "" 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 hoFaceTree to voItems Handle hoItems Get Create (RefClass(cComItems)) to hoItems Set pvComObject of hoItems to voItems Set ComCount of hoItems to 1 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 Variant voItem Get ComItem of hoItems1 0 to voItem Handle hoItem Get Create (RefClass(cComItem)) to hoItem Set pvComObject of hoItem to voItem Set ComToString of hoItem to "Root(Child1(SubChild 1,SubChild 2),Child2)" Send Destroy to hoItem Send Destroy to hoItems1 Variant voItems2 Get ComItems of hoFaceTree to voItems2 Handle hoItems2 Get Create (RefClass(cComItems)) to hoItems2 Set pvComObject of hoItems2 to voItems2 Send ComExpandAll of hoItems2 Send Destroy to hoItems2 Variant v Variant voItems3 Get ComItems of hoFaceTree to voItems3 Handle hoItems3 Get Create (RefClass(cComItems)) to hoItems3 Set pvComObject of hoItems3 to voItems3 Variant voItem1 Get ComItem of hoItems3 0 to voItem1 Handle hoItem1 Get Create (RefClass(cComItem)) to hoItem1 Set pvComObject of hoItem1 to voItem1 Get ComToString of hoItem1 to v Send Destroy to hoItem1 Send Destroy to hoItems3 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(""):Alignment := 0/*LeftAlignment*/ oFaceTree:Items():Count := 1 oFaceTree:Items:Item(0):ToString := "Root(Child1(SubChild 1,SubChild 2),Child2)" 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