Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim tableview1 As TableView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
tableview1.Initialize("tv1") ' manually build the table
tableview1.SetColumns(Array("one","two","three"))
tableview1.SetColumnWidth(0,100)
tableview1.SetColumnWidth(1,100)
tableview1.SetColumnWidth(2,100)
MainForm.RootPane.AddNode(tableview1,0,0,400,500)
For a = 0 To 5 ' put some data in the table
tableview1.Items.Add(Array(a,a*2,a*5))
Next
' the search bit is from here down
Dim row() As Object
Dim col as Int = 2 ' the column I want to search
Dim what As Object = 25 ' what I want to search for
Dim cnt As Int = 0
row = tableview1.Items.Get(cnt)
Do While row(col)<>what 'search third column for value
cnt = cnt + 1
If cnt = tableview1.Items.Size Then Exit
row = tableview1.Items.Get(cnt)
If row(col)=what Then
Exit
Else
row(0) = "not found"
End If
Loop
Log(row(0)) ' display first column value or 'not found'
End Sub