SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Returns the index of the item found at given coordinates.
Deprecated - Provided for compatibility with earlier versions only - Use Items.HitTest instead
VB.NET | ItemIndex = object.HitTest(ByVal xPos As Single, ByVal yPos As Single) As Integer |
VB | ItemIndex = object.HitTest(ByVal xPos As Single, ByVal yPos As Single) As Long |
C#.NET | int ItemIndex = object.HitTest(float xPos, float yPos); |
VC++ | long ItemIndex = object->HitTest(float xPos, float yPos); |
C | HRESULT object->raw_HitTest(float xPos, float yPos, long* ItemIndex); |
object
xPos
The x coordinate to be tested. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.
yPos
The y coordinate to be tested. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.
ItemIndex
Returns the zero-based index of the item found at the specified coordinates. -1 is returned if no item is found.
Deprecated - Provided for compatibility with earlier versions only - Use Items.HitTest instead
The HitTest method returns the index of the item found at given coordinates.
The HitTest and HitTestPix methods are synonyms, but may use different coordinate systems.
If an item is found at the coordinates (xPos, yPos), the zero-based index of the item is returned. If the specified coordinates are located in the row/column header or column header area, -1 is returned. If the coordinates are located in the tree control's client area, below the last item displayed, the zero-based index of the last item + 1 is returned, which is equal to the number of items in the tree control.
The HitTest method can be used during a DragOver or OLEDragOver event to determine which item is currently the target of the drag & drop operation. The CalcCellFromPos or CalcIndexFromPos methods can also be used.
See Also SftTree Object | Object Hierarchy