Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
MainForm.Show
MainForm.Title = "Table Example"
'set the columns
tv1.SetColumns(Array As String("Col1", "Col2"))
'fill with data
'each row must be an array of objects. Make sure not to reuse the same array!
Dim row(2) As Object
row(0) = "Bob"
'the second item will be later edited by the user. To allow it to be updated we use a label.
Dim lbl As Label
lbl.Initialize("")
lbl.Text = "1"
row(1) = lbl
tv1.Items.Add(row)
Dim row(2) As Object
row(0) = "john"
'the second item will be later edited by the user. To allow it to be updated we use a label.
Dim lbl As Label
lbl.Initialize("")
lbl.Text = "2"
row(1) = lbl
tv1.Items.Add(row)
Dim row(2) As Object
row(0) = "bill"
'the second item will be later edited by the user. To allow it to be updated we use a label.
Dim lbl As Label
lbl.Initialize("")
lbl.Text = "3"
row(1) = lbl
tv1.Items.Add(row)
Dim row(2) As Object
row(0) = "Jack"
'the second item will be later edited by the user. To allow it to be updated we use a label.
Dim lbl As Label
lbl.Initialize("")
lbl.Text = "4"
row(1) = lbl
tv1.Items.Add(row)
tv1.SetColumnSortable(1, False)
btnUpdate.Enabled = False
End Sub