PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Number of the row at specified location
  • Details about the elements returned by the treeZone constant
  • Various
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
TreeInfoXY (Function)
In French: ArbreInfoXY
Returns the element of a TreeView control found at a given position.
Example of TreeView control:
Vocabulary linked to a TreeView control
Example
// -- Click code on TREE_TreeView1
X, Y are int
X = LoWord(CursorPos())
Y = HiWord(CursorPos())
// Find the number of the row corresponding to the click
RowClick is int
RowClick = TreeInfoXY(TREE_TreeView1, ...
treeLineNumber + treeOriginScreen, X, Y)
// Find the name of the branch
Branch is string
Branch = TreeInfoXY(TREE_TreeView1, ...
treeBranchName + treeOriginScreen, X, Y)
Trace("You've clicked the branch " + ...
Branch + "(row #" + RowClick + ")")
Syntax
<Result> = TreeInfoXY(<TreeView Control> , <Type of Information> , <X> , <Y>)
<Result>: Character string, integer or Integer constant
Requested information:
  • Number of the row at specified location, -1 if there is no row.
  • Name of branch at specified location, empty string ("") if there is no branch.
  • Type of hovered area. This type corresponds to one of the following constants:
    tizButton"+/-" button displayed in front of the caption of treeview element.
    Versions 16 and later
    tizCheckmark
    New in version 16
    tizCheckmark
    tizCheckmark
    Checkmark of element.
    tizRightSpace found on the right of element caption.
    tizOutSpace found below the treeview elements.
    tizLeftSpace found on the left of element caption.
    tizImageImage displayed in front of the element caption.
    tizCaptionCaption of element.
<TreeView Control>: Control name
Name of TreeView control to use.
If this parameter corresponds to an empty string (""), TreeInfoXY handles the TreeView control to which the current process belongs.
<Type of Information>: Constant or combination of constants
Requested type of information:
treeBranchIDIdentifier of element found at (X,Y)
treeBranchNameName of element found at (X,Y)
treeLineNumberNumber of the row found at (X,Y)
treeOriginScreenIf this option is specified, the origin of the specified coordinates corresponds to the screen (and not the TreeView control).
This constant cannot be used on its own.
treeZoneType of hovered area
<X>: Integer
X coordinate (in pixels) to study. This coordinate is given in relation to the treeview (if the treeOriginScreen constant is not specified).
<Y>: Integer
Y coordinate (in pixels) to study. This coordinate is given in relation to the treeview (if the treeOriginScreen constant is not specified).
Remarks

Number of the row at specified location

If the treeLineNumber constant is used, TreeInfoXY returns the number of the row for the specified location. This row number is an "instantaneous" row number, it takes into account all the elements expanded above the row. This row can be handled by the following syntax:
<TreeView Name> [<Number of Row to Handle>]

Details about the elements returned by the treeZone constant

The following illustration presents the different areas that can be retrieved by the treeZone constant.
Retrieved zones

Various

TreeInfoXY can be used with a TreeView control that supports the duplicates. See Managing duplicates in the TreeView controls for more details.
Components
WINDEVReports and Queries wd230obj.dll
Windows Mobile wp230obj.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment