[]
Returns information about the control at at the current mouse position.
public C1TopicBarHitTestInfo HitTest()
Type | Description |
---|---|
C1TopicBarHitTestInfo | A C1TopicBarHitTestInfo object that contains information about the point. |
Returns information about the control at a specified point on the control surface.
public C1TopicBarHitTestInfo HitTest(int x, int y)
Type | Name | Description |
---|---|---|
int | x | The horizontal position of the client coordinate. |
int | y | The vertical position of the client coordinate. |
Type | Description |
---|---|
C1TopicBarHitTestInfo | A C1TopicBarHitTestInfo object that contains information about the point. |
This method is useful when handling the MouseMove, MouseDown events or similar. It allows you to determine whether the mouse is over a specific link, page title, etc.
Returns information about the control at a specified point on the control surface.
public C1TopicBarHitTestInfo HitTest(Point p)
Type | Name | Description |
---|---|---|
Point | p | Point in client coordinates. |
Type | Description |
---|---|
C1TopicBarHitTestInfo | A C1TopicBarHitTestInfo object that contains information about the point. |
This method is useful when handling the MouseMove, MouseDown events or similar. It allows you to determine whether the mouse is over a specific link, page title, etc.
The code below shows hit test information whenever the user moves the mouse:
Private Sub C1TopicBar1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles C1TopicBar1.MouseMove
Dim ht As C1.Win.C1Command.C1TopicBarHitTestInfo = C1TopicBar1.HitTest(e.Location)
Label1.Text = ht.Type.ToString()
If (Not IsNothing(ht.Page)) Then
Label2.Text = ht.Page.Text
Else
Label2.Text = ""
End If
If (Not IsNothing(ht.Link)) Then
Label3.Text = ht.Link.Text
Else
Label3.Text = ""
End If
End Sub