- Method 1: Fill according to the position of parent row
- Method 2: Fill according to the path of parent element
How to fill a TreeView Table control?
A TreeView Table control is a Table control whose one of the columns is a treeview. A TreeView Table control is filled by TableAddChild. Several fill methods are available: Method 1: Fill according to the position of parent row This method is based on the position of parent row. Each child element is added in relation to the row number of its parent. The syntax of TableAddChild is as follows:
TableAddChild(<Name of TreeView Table>, <Row Number of Parent>, <Child Element>)
For example:
TableAddChild(TVT_MyTable, 0, "France") TableAddChild(TVT_MyTable, 0, "Italy") TableAddChild(TVT_MyTable, 1, "Hérault") TableAddChild(TVT_MyTable, 1, "Gard") TableAddChild(TVT_MyTable, 4, "Tuscany") TableAddChild(TVT_MyTable, 4, "Venetia") TableAddChild(TVT_MyTable, 2, "Montpellier") TableAddChild(TVT_MyTable, 2, "Sète") TableAddChild(TVT_MyTable, 5, "Nimes") TableAddChild(TVT_MyTable, 2, "Agde") TableAddChild(TVT_MyTable, 9, "Florence") TableAddChild(TVT_MyTable, 9, "Siena") TableAddChild(TVT_MyTable, 12, "Venice") TableAddChild(TVT_MyTable, 8, "Lombardy") TableAddChild(TVT_MyTable, 14, "Milan")
Method 2: Fill according to the path of parent element This method is based on the path of parent row. Each child element is added in relation to the path of its parent. The syntax of TableAddChild is as follows:
TableAddChild(<Name of TreeView Table>, <Path of Parent Element>, <Child Element>)
For example:
TableAddChild(TVT_MyTable, "", "France") TableAddChild(TVT_MyTable, "", "Italy") TableAddChild(TVT_MyTable, "France", "Hérault") TableAddChild(TVT_MyTable, "France", "Gard") TableAddChild(TVT_MyTable, "Italy", "Tuscany") TableAddChild(TVT_MyTable, "Italy", "Venetia") TableAddChild(TVT_MyTable, "France" + TAB + "Hérault", "Montpellier") TableAddChild(TVT_MyTable, "France" + TAB + "Hérault", "Sète") TableAddChild(TVT_MyTable, "France" + TAB + "Gard", "Nimes") TableAddChild(TVT_MyTable, "France" + TAB + "Hérault", "Agde") TableAddChild(TVT_MyTable, "Italy" + TAB + "Tuscany", "Florence") TableAddChild(TVT_MyTable, "Italy" + TAB + "Tuscany", "Siena") TableAddChild(TVT_MyTable, "Italy" + TAB + "Venetia", "Venice") TableAddChild(TVT_MyTable, "Italy", "Lombardy") TableAddChild(TVT_MyTable, "Italy" + TAB + "Lombardy", "Milan")
This page is also available for…
|
|
|