ToolTipEventArgs.Text Property

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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.

Namespace:   System.Windows.Forms.DataVisualization.Charting
Assembly:  System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)

public string Text { get; set; }

Property Value

Type: System.String

A string value that represents the tooltip text of the element the GetToolTipText event was raised for.

This property is exposed in the GetToolTipText event of the root Chart object.

  • 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.

  • If you get this property, it will always return a zero-length string for any chart element items that do not have a tooltip.

You can set this property to:

  • Override the tooltip for any of the chart elements capable of assigning tooltips.

  • Assign a tooltip to a chart element that does not support tooltips.

.NET Framework
Available since 4.0
Return to top