PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

This page concerns the 23 + version of WINDEV, WINDEV Mobile. Upgrade your version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
TreeGetSubscript (Function)
In French: ArbreRécupèreIndice
Returns the subscript of an element (node or leaf) in a TreeView control.
Note: This function allows you to retrieve the subscript in order to call the properties on a row found in a TreeView control by using the following syntax:
TreeView_Name[Subscript]..<Property Name> = ...
Example
// Switch the leaf line to red
nSubscript is int
nSubscript = TreeGetSubscript(TREE_TreeView1, "Root" + TAB + "Node" + TAB + "Leaf")
IF nSubscript > 0 THEN
// Checks whether the node is visible before using it
IF TREE_TreeView1[nSubscript] = -1 THEN
// The node is not visible: expand it to make it visible
TreeExpand(TREE_TreeView1, "Root" + TAB + "Node" + TAB + "Leaf")
END
// Modifies its color
TREE_TreeView1[nSubscript]..Color = DarkRed
END
Syntax
<Result> = TreeGetSubscript(<TreeView Control> , <Element Path>)
<Result>: Integer
  • Subscript if the element was found.
    Caution: The node can be handled only if it is visible (which means if it is expanded).
  • -1 if the element does not exist.
<TreeView Control>: Control name
Name of TreeView control to use.
<Element Path>: Character string
Full path of element to delete. This parameter has the following format:
"<Name of Root>" + TAB + ["<Name of 1st Node>" + TAB + ...
["<Name of 2nd Node>" + TAB + [...]]]"<Leaf Name>"
If duplicates are found for a path element, this path can contain the element identifier (specified after the name by TreeID).
Components
WINDEVReports and Queries wd230obj.dll
Windows Mobile wp230obj.dll
Minimum required version
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment