Gets a
HitTestResult object, which provides information about the chart element the
GetToolTipText event was raised for.
Hit Test Result Object.
Syntax
Visual Basic (Declaration) |
|
Public ReadOnly Property HitTestResult As HitTestResult |
Return Value
An object of type
HitTestResult that represents information for the element the
GetToolTipText event was raised for.
Example
We use this event to provide tooltip text for a scrollbar thumb, which is associated with the primary X axis in a chart area named "Default".
C# |
Copy Code |
using Dundas.Charting.WinControl; ... // NOTE: Add events In C# using the Properties window so that the Event handler code Is added correctly Private void chart1_GetToolTipText(Object sender, Dundas.Charting.WinControl.ToolTipEventArgs e) { // Check For scrolling thumb If(e.HitTestResult.ChartElementType == ChartElementType.SBThumbTracker) { // Check For chart area Object If(e.HitTestResult.ChartArea.Name == "Default") { // Check For axis Type If(e.HitTestResult.Axis.Type == AxisName.X) { // We have the right scrolling thumb, Set tooltip text e.Text = "Scrolling thumb text"; } } } } |
Visual Basic |
Copy Code |
Imports Dundas.Charting.WinControl ... Private Sub chart1_GetToolTipText(ByVal sender As Object, ByVal e As Dundas.Charting.WinControl.ToolTipEventArgs) _ Handles chart1.GetToolTipText
If e.HitTestResult.ChartElementType = ChartElementType.SBThumbTracker Then
If e.HitTestResult.ChartArea.Name = "Default" Then
If e.HitTestResult.Axis.Type = AxisName.X Then
e.Text = "Scrolling thumb text"
End If End If End If End Sub |
Remarks
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also