PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Row number at specified point
  • Details about the elements returned by the treeZone constant
  • Miscellaneous
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
Returns the element of a TreeView control found at a given position.
Example of TreeView control:
Vocabulary linked to a TreeView control
Example
// -- Click on the TREE_TreeView1 control
X, Y are int
X = LoWord(CursorPos())
Y = HiWord(CursorPos())
// Find the number of the row corresponding to the click
RowClick is int
RowClick = TREE_TreeView1.InfoXY(treeLineNumber + treeOriginScreen, X, Y)
// Find the branch name
Branch is string
Branch = TREE_TreeView1.InfoXY(treeBranchName + treeOriginScreen, X, Y)
Trace("You've clicked the branch " + ...
Branch + "(row #" + RowClick + ")")
Syntax
<Result> = <TreeView control>.InfoXY(<Type of information> , <X> , <Y>)
<Result>: Character string, integer or Integer constant
Requested information:
  • Number of the row at specified point, -1 if there is no row.
  • Name of the branch at specified point, empty string ("") if there is no branch.
  • Type of hovered area. This type corresponds to one of the following constants:
    tizButton"+ / -" button next to the caption of the TreeView control element.
    Versions 16 and later
    tizCheckmark
    New in version 16
    tizCheckmark
    tizCheckmark
    Checkmark of element.
    tizRightSpace found on the right of element caption.
    tizOutSpace below the elements of the TreeView control.
    tizLeftSpace found on the left of element caption.
    tizImageImage displayed in front of the element caption.
    tizCaptionElement caption.
<TreeView control>: Control name
Name of TreeView control to use.
<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 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 control (if the treeOriginScreen constant is not specified).
<Y>: Integer
Y coordinate (in pixels) to study. This coordinate is given in relation to the TreeView control (if the treeOriginScreen constant is not specified).
Remarks

Row number at specified point

If the treeLineNumber constant is used, <TreeView>.InfoXY returns the number of the row for the specified point. 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 control> [<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

Miscellaneous

<TreeView>.InfoXY can be used with a TreeView control that supports the duplicates. See Managing duplicates in the TreeView controls for more details.
Component : wd240obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment