PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Example 1: Filling a TreeView Table control
  • Example 2: Filling a TreeView Table control and modifying the images used
TableAddChild (Example)
Example 1: Filling a TreeView Table control
WINDEVWindows The following code is used to populate a TreeView Table control on 2 levels:
TableAdd(TVT_TreeViewTable, "Row1")
TableAddChild(TVT_TreeViewTable, TVT_TreeViewTable.Count, "Row 1 - 1")
TableAddChild(TVT_TreeViewTable, TVT_TreeViewTable.Count, "Row 1 - 2")
TableAddChild(TVT_TreeViewTable, TVT_TreeViewTable.Count, "Row 1 - 3")
 
TableAdd(TVT_TreeViewTable, "Row2")
TableAddChild(TVT_TreeViewTable, TVT_TreeViewTable.Count, "Row 2 - 1")
TableAddChild(TVT_TreeViewTable, TVT_TreeViewTable.Count, "Row 2 - 2")
 
TableAdd(TVT_TreeViewTable, "Row3")
TableAddChild(TVT_TreeViewTable, TVT_TreeViewTable.Count, "Row 3 - 1")
TableAddChild(TVT_TreeViewTable, TVT_TreeViewTable.Count, "Row 3 - 2")
TableAddChild(TVT_TreeViewTable, TVT_TreeViewTable.Count, "Row 3 - 3")
TableAddChild(TVT_TreeViewTable, TVT_TreeViewTable.Count, "Row 3 - 4")
Example 2: Filling a TreeView Table control and modifying the images used
WINDEVWindows The following code is used to populate a TreeView Table control:
// Fill the TreeView Table
nIndex is int
nChildIndex is int
 
// Modify the expanded and collapsed images
TVT_MyTable.CollapsedImage = "02263-16-5.png"
TVT_MyTable.ExpandedImage = "01058-16-5.png"
 
// Add a branch
nIndex = TableAddLine(TVT_MyTable, "CIA3ER")
// Modify the expanded and collapsed image
TVT_MyTable[nIndex].CollapsedImage = "02263-16-5.png"
TVT_MyTable[nIndex].ExpandedImage = "02263-16-5.png"
 
// Add a child
nChildIndex = TableAddChild(TVT_MyTable, nIndex, "Mrs DALMOSSO",...
"dalmosso.yamina@caramail.com","(+33)5662424768", ...
"Call URGENTLY")
// Modify the expanded and collapsed image
TVT_MyTable[nChildIndex].CollapsedImage = "01058-16-5.png"
TVT_MyTable[nChildIndex].ExpandedImage = "01058-16-5.png"
 
// Add a branch
nIndex = TableAddLine(TVT_MyTable, "ASSOCIATIONEN INFANESTH")
 
// Modify the expanded and collapsed image
TVT_MyTable[nIndex].CollapsedImage = "02263-16-5.png"
TVT_MyTable[nIndex].ExpandedImage = "02263-16-5.png"
nIndex = TableAddLine(TVT_MyTable, "UNIVERSITES DE POITIERS")
 
// Modify the expanded and collapsed image
TVT_MyTable[nIndex].CollapsedImage = "02263-16-5.png"
TVT_MyTable[nIndex].ExpandedImage = "02263-16-5.png"
 
// Add a child
nChildIndex = TableAddChild(TVT_MyTable,nIndex, "Mr TAEITA", ...
"taeita.berthold@free.fr", "(33)56206413955")
// Modify the expanded and collapsed image
TVT_MyTable[nChildIndex].CollapsedImage = "01058-16-5.png"
TVT_MyTable[nChildIndex].ExpandedImage = "01058-16-5.png"
 
nChildIndex = TableAddChild(TVT_MyTable, nIndex, "Mrs SANTINA", ...
"santina.isalyne@wanadoo.fr", "(02)25-41073667")
// Modify the expanded and collapsed image
TVT_MyTable[nChildIndex].CollapsedImage = "01058-16-5.png"
TVT_MyTable[nChildIndex].ExpandedImage = "01058-16-5.png"
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment