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.RootPane.LoadLayout("1") 'Load the layout file.
MainForm.Show
Dim flags() As String = Array As String("france", "germany", "japan")
For i = 1 To 100
Dim ti As TreeItem
ti.Initialize("", "Item " & i)
ti.Image = fx.LoadImage(File.DirAssets, flags(Rnd(0, flags.Length)) & ".png")
For ii = 1 To 5
Dim c As TreeItem
c.Initialize("", "child")
ti.Children.Add(c)
c.Image = fx.LoadImage(File.DirAssets, flags(Rnd(0, flags.Length)) & ".png")
Next
TreeView1.Root.Children.Add(ti)
Next
End Sub