Skip to main content

ToolTipController Class

A tooltip controller for individual UI controls.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v24.1.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

Declaration

public class ToolTipController :
    Component,
    IExtenderProvider,
    IToolTipControllerInternal

The following members return ToolTipController objects:

Show 43 links

Remarks

The ToolTipController component allows you to customize the appearance and behavior of tooltips/hints displayed for DevExpress UI controls. You can customize appearance settings, time intervals that must pass before the tooltip is displayed or hidden, the type of tooltips, etc.

Use the ToolTipController to manage various types of tooltips (standard hints, super/advanced tooltips, flyout, html-powered tooltips). Use the ToolTipController.ToolTipType property to specify the type of tooltips.

Standard Tooltips

A regular tooltip can display the title, text, and icon. A tooltip’s contents is determined by a control for which the tooltip is displayed.

Regular Tooltip - WinForms UI Controls, DevExpress

Super Tooltips

A Super Tooltip can display the title/header, multiline text content with an image, and footer.

Super Tooltip - WinForms UI Controls, DevExpress

Assign the ToolTipController to a DevExpress Control

DevExpress UI controls and components introduce the ToolTipController property that allows you to assign a tooltip controller to controls.

The following example creates a tooltip controller and assigns it to a WinForms Data Grid control:

using DevExpress.Utils;

public partial class Form1 : DevExpress.XtraEditors.XtraForm
{
    ToolTipController controller;
    public Form1()
    {
        InitializeComponent();
        controller = new ToolTipController() { ToolTipType = ToolTipType.Standard, Rounded = true };
        gridControl1.ToolTipController = controller;
    }
}

To dynamically customize tooltips displayed for a specific control or UI elements, handle the ToolTipController.BeforeShow and/or ToolTipController.CustomDraw event.

Assign the ToolTipController to a Non-DevExpress Control

You can also use the ToolTipController component to manage tooltips for non-DevExpress UI controls (for example, standard WinForms controls). When the ToolTipController component is placed on a form, all controls introduce ToolTip, Title, ToolTipIconType, and SuperTip properties (for example, the ToolTip property’s caption in the Properties window is “ToolTip on ToolTipController1”).

If a tooltip is specified by the ToolTip, Title, or SuperTip property, hovering the mouse pointer over the control displays a hint, which is controlled by the tooltip controller. Use ToolTipController.SetToolTip, ToolTipController.SetTitle, ToolTipController.SetToolTipIconType, and ToolTipController.SetSuperTip methods to specify a tooltip for a control in code.

Important

If you create custom UI controls and wish to use them on a form that contains a ToolTipController, do not implement ToolTip, Title, ToolTipIconType, and/or SuperTip properties to the control to avoid conflicts.

Note

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

High-DPI Support

Use the ShowHint(ToolTipControllerShowEventArgs) method to display tooltips on high-DPI displays. When creating ToolTipControllerShowEventArgs, you should set the SelectedControl property:

ToolTipControllerShowEventArgs toolTipControllerShowEventArgs = new DevExpress.Utils.ToolTipControllerShowEventArgs(labelControl1, null);
toolTipControllerShowEventArgs.Title = "High-DPI Tooltip Title";
toolTipController1.ShowHint(toolTipControllerShowEventArgs);

Inheritance

See Also