ToolTipEventArgs ToolTipEventArgs ToolTipEventArgs ToolTipEventArgs Class

Definition

Used as a parameter object in the GetToolTipText event of the root Chart object.

public ref class ToolTipEventArgs : EventArgs
public class ToolTipEventArgs : EventArgs
type ToolTipEventArgs = class
    inherit EventArgs
Public Class ToolTipEventArgs
Inherits EventArgs
Inheritance
ToolTipEventArgsToolTipEventArgsToolTipEventArgsToolTipEventArgs

Remarks

This class is exposed as the e parameter in the GetToolTipText event, and provides the mouse position, tooltip text, if any, and details about the chart element over which the mouse cursor is held when the event is raised.

The GetToolTipText event is raised several seconds after the mouse cursor is held over a relevant chart element.

The ToolTipEventArgs class contains the following properties:

  • The X and Y properties, which are used to get the mouse coordinates.

  • The Text property, which is used to get the tooltip for the chart element that the event is raised for. Note that many of the chart elements have a ToolTip, LegendToolTip, and/or LabelToolTip property that you can use to assign a tooltip. These elements include legends, annotations, data points, series, axes, titles, custom labels, and strip lines. This property can also be used to override the tooltip for a chart element, or to set a tooltip for a chart element that doesn't have a ToolTip property.

  • The HitTestResult property, which provides information on the chart element for which the event was raised.

Constructors

ToolTipEventArgs(Int32, Int32, String, HitTestResult) ToolTipEventArgs(Int32, Int32, String, HitTestResult) ToolTipEventArgs(Int32, Int32, String, HitTestResult) ToolTipEventArgs(Int32, Int32, String, HitTestResult)

Initializes a new instance of the ToolTipEventArgs class with the specified x, y, text and result parameters.

Properties

HitTestResult HitTestResult HitTestResult HitTestResult

Gets a HitTestResult object, which provides information about the chart element that the GetToolTipText event was raised for.

Text Text Text Text

Gets or sets the tooltip, if any, of the chart element over which the mouse cursor is held. This property can also set a tooltip for this chart element.

X X X X

Gets the X coordinate of the point the mouse cursor is held over when the GetToolTipText event is raised.

Y Y Y Y

Gets the Y coordinate of the point the mouse cursor is held over when the GetToolTipText event is raised.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to