Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private TreeView1 As TreeView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
TreeView1.Initialize("TreeView1") 'here we create it by code. Usually you will add it with the builder.
MainForm.RootPane.AddNode(TreeView1, 0, 0, 400, 400)
'add 10 items, each with a child item
For i = 1 To 10
Dim ti As TreeItem
ti.Initialize("ti", "Item #" & i)
Dim cti As TreeItem
cti.Initialize("ti", "My father is Item #" & i)
ti.Children.Add(cti) 'add the child
TreeView1.Root.Children.Add(ti) 'add the father to the root
Next
End Sub