windowsforms-devexpress-dot-xtratreelist-3f2ef8ba.md
Represents a class that contains information about what is located at a specific point within the TreeList control.
Namespace : DevExpress.XtraTreeList
Assembly : DevExpress.XtraTreeList.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList
public class TreeListHitInfo
Public Class TreeListHitInfo
The following members return TreeListHitInfo objects:
These class members can be used to provide a user with information about a specific point of the TreeList control. The TreeList.CalcHitInfo method of the TreeList object returns a TreeListHitInfo class instance containing information about a specific point of the TreeList control.
The code below obtains the name of the element located under the mouse pointer. The MouseMove event is handled to track mouse pointer movement.
using DevExpress.XtraTreeList;
//...
private void treeList1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) {
TreeListHitInfo hi = treeList1.CalcHitInfo(new Point(e.X, e.Y));
string elementName = hi.HitInfoType.ToString();
//...
}
Imports DevExpress.XtraTreeList
'...
Private Sub TreeList1_MouseMove(ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) _
Handles TreeList1.MouseMove
Dim hi As TreeListHitInfo = TreeList1.CalcHitInfo(New Point(e.X, e.Y))
Dim ElementName As String = hi.HitInfoType.ToString()
' ...
End Sub
Object TreeListHitInfo
See Also