PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- Form: form1 (d:\all_zapl\test.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 06/30/05 04:38:09 PM * DEFINE CLASS form1 AS form Top = 0 Left = 0 Height = 651 Width = 363 DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT olecontrol1 AS olecontrol WITH ; Top = 29, ; Left = 31, ; Height = 599, ; Width = 314, ; Name = "Olecontrol1" PROCEDURE Init thisform.olecontrol1.Nodes.Add(,1,"MAIN","Main Node") FOR asd = 1 TO 10 thisform.olecontrol1.Nodes.Add("MAIN",4,TRANSFORM(asd)+"_","Node "+TRANSFORM(asd)) NEXT FOR asd = 1 TO 10 IF asd % 2 == 0 thisform.olecontrol1.Nodes.Add(TRANSFORM(asd)+"_",4,TRANSFORM(asd+50)+"_","Child Node "+TRANSFORM(asd)) ENDIF NEXT ENDPROC PROCEDURE olecontrol1.NodeClick *** ActiveX Control Event *** LPARAMETERS node IF ISNULL(node.Child) IF ISNULL(node.Next) this.SelectedItem = node.Parent ELSE this.SelectedItem = node.Next ENDIF this.NodeClick(this.SelectedItem) ENDIF ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************