Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim ta As TableView
Dim tf As TextField
Dim li As List
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
' just create a tableview and textfield
tf.Initialize("tf")
ta.Initialize("")
ta.SetColumns(Array("one","two","three"))
ta.SetColumnWidth(0,100)
ta.SetColumnWidth(1,100)
ta.SetColumnWidth(2,100)
MainForm.RootPane.AddNode(tf,10,10,100,20)
MainForm.RootPane.AddNode(ta,10,40,300,400)
li.Initialize
' list li will contain the contents of the tableview - they will remain linked
' if you add an item to the list it will appear in the tableview
li = ta.Items
End Sub
'add the textfield content to the list, and hence the tableview
Sub tf_Action
li.Add(Array(tf.Text," "," "))
tf.Text = ""
End Sub