PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

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