ToolTipController Class

Provides tooltip management for individual controls.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v20.1.dll

Declaration

public class ToolTipController :
    Component,
    IExtenderProvider
Public Class ToolTipController
    Inherits Component
    Implements IExtenderProvider

Remarks

The ToolTipController component enables you to customize the appearance and behavior of hints displayed for controls or their elements. You can customize the hint window's appearance, the time intervals that must pass before the hint is invoked or hidden, the type of tooltips, etc. The ToolTipController supports regular tooltips and SuperToolTip objects.

A regular tooltip can consist of the text and title region, either of which can be omitted. In addition, a predefined or custom icon can be displayed within the tooltip. A tooltip's contents are determined by the control for which the tooltip is displayed. The following image shows a regular tooltip:

ToolTip_Regular

A SuperToolTip object represents a tooltip that can contain multiple text and image regions. A typical SuperToolTip contains a header, contents and footer regions, where you can display custom images:

ToolTip_SuperToolTip

To specify the type of tooltips to be displayed, use the ToolTipController.ToolTipType property.

DevExpess controls and components provide the ToolTipController property, which allows a ToolTipController to be bound. After a tooltip controller is assigned to the property, the appearance and behavior of hints in this control/component is determined by the assigned tooltip controller. DevExpress controls implement the DevExpress.Utils.IToolTipControlClient interface, and supply additional information to the ToolTipController via this interface.

Non-DevExpress controls (for instance, the standard WinForms controls) do not implement the DevExpress.Utils.IToolTipControlClient interface. Tooltips, however, can still be displayed for them using the ToolTipController component. When a ToolTipController component is placed on a form, all controls publish the ToolTip, Title, ToolTipIconType and SuperTip properties (for instance, the ToolTip property's caption in the Properties window is 'ToolTip on ToolTipController1').

If a tooltip is specified via the ToolTip, Title or SuperTip property, hovering the mouse pointer over the control results in a hint, which is controlled by the tooltip controller currently displayed. Note that you should use the ToolTipController.SetToolTip, ToolTipController.SetTitle, ToolTipController.SetToolTipIconType and ToolTipController.SetSuperTip methods, to specify a tooltip for such a control in code.

NOTE

If you create custom controls, and wish to use them on a form that contains a ToolTipController, do not add a new ToolTip, Title, ToolTipIconType or SuperTip property to the control. At design time, any of these custom properties will conflict with corresponding properties added by the ToolTipController. For custom properties, use other names instead.

NOTE

A currently visible tooltip is hidden when a control receives the MouseDown, MouseEnter or MouseLeave event.

To dynamically customize hints displayed for particular controls or their elements, handle the ToolTipController.BeforeShow and/or ToolTipController.CustomDraw event.

Refer to the Tooltips topic for more information.

Inheritance

See Also