### Pane add TableView

Example of creating a TableView and add to a Pane.
The Pane could be placed in the center of a BorderPane.
'Create a tableview and add to a pane
'p as the pane the tableview is added to
'cl as the list holding the tableview columns
'dl as the list holding the maps with the column data
'Example:
' Dim cl As List : cl.Initialize : cl.AddAll(Array As String("Field","Type","Null","Key","Default","Extra"))
' Dim dl As List : dl.Initialize : dl.AddAll(Array As String("note","varchar(255)","YES","","null",""))
' TableView_Create(pnInfo, cl, dl)
'
`Sub TableView_Create(p As Pane, cl As List, dl As List)
p.RemoveAllNodes
Dim tv As TableView
tv.Initialize("tv")
tv.SetColumns(cl)
For i=0 To tv.ColumnsCount -1
tv.SetColumnWidth(i, ((p.PrefWidth - 5) / tv.ColumnsCount))
Next
p.AddNode(tv, 0, 0, p.PrefWidth, p.PrefHeight)
For i = 0 To dl.Size - 1
Dim m As Map = dl.Get(i)
Dim r(tv.ColumnsCount) As Object
For i = 0 To m.Size -1
r(i) = m.GetValueAt(i)
Next
tv.Items.Add(r)
Next
End Sub`

Changed: , Category: Panes, File: T6C230M1690.htm, ID: 1690