Skip to main content
All docs
V25.1
  • GanttControl.TimelineTaskToolTipShowing Event

    Allows you to display a regular or super tooltip for a task displayed on the timeline.

    Namespace: DevExpress.XtraGantt

    Assembly: DevExpress.XtraGantt.v25.1.dll

    NuGet Package: DevExpress.Win.Gantt

    Declaration

    [DXCategory("Events")]
    public event GanttTimelineTaskToolTipShowingEventHandler TimelineTaskToolTipShowing

    Event Data

    The TimelineTaskToolTipShowing event's data class is GanttTimelineTaskToolTipShowingEventArgs. The following properties provide information specific to this event:

    Property Description
    Node Gets the node that corresponds to the task displayed on the timeline.
    SuperTip Gets or sets a super tooltip for a task displayed on the timeline.
    Task Gets view information about the task displayed on the timeline.
    Text Gets or sets a regular tooltip for a task displayed on the timeline.

    Remarks

    The Gantt control raises the TimelineTaskToolTipShowing event when a user hovers the mouse pointer over a task displayed on the timeline. Handle this event to specify and display a regular or super tooltip.

    The following example demonstrates how to display a super tooltip for tasks displayed on the timeline:

    Display Super Tooltip - WinForms Gantt Control

    using System.Diagnostics;
    using DevExpress.Utils;
    using DevExpress.XtraGantt;
    
    public Form1() {
      // ...
      ganttControl1.TimelineTaskToolTipShowing += GanttControl1_TimelineTaskToolTipShowing;
      // Specifies a Tooltip controller.
      ganttControl1.ToolTipController = toolTipController1;
      toolTipController1.HyperlinkClick += ToolTipController1_HyperlinkClick;
    }
    
    private void GanttControl1_TimelineTaskToolTipShowing(object sender, GanttTimelineTaskToolTipShowingEventArgs e) {
      SuperToolTip supertooltip = new SuperToolTip() { AllowHtmlText = DefaultBoolean.True };
      supertooltip.Items.AddTitle(e.Node["Name"].ToString());
      supertooltip.Items.Add(string.Format("{0:d} - {1:d}<br>{2}", e.Node["StartDate"], e.Node["EndDate"], e.Node["Description"]));
      supertooltip.Items.AddSeparator();
      supertooltip.Items.Add("<a href='https://docs.devexpress.com/WindowsForms/2398/common-features/tooltips'>Documentation</a>");
      e.SuperTip = supertooltip;
    }
    
    private void ToolTipController1_HyperlinkClick(object sender, HyperlinkClickEventArgs e) {
      Process process = new Process();
      process.StartInfo.FileName = (e.Link);
      process.StartInfo.Verb = "open";
      process.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
      try {
          process.Start();
      } catch { }
    }
    
    See Also