Back to Devexpress

GanttTimelineTaskToolTipShowingEventArgs.SuperTip Property

windowsforms-devexpress-dot-xtragantt-dot-gantttimelinetasktooltipshowingeventargs.md

latest4.2 KB
Original Source

GanttTimelineTaskToolTipShowingEventArgs.SuperTip Property

Gets or sets a super tooltip for a task displayed on the timeline.

Namespace : DevExpress.XtraGantt

Assembly : DevExpress.XtraGantt.v25.2.dll

NuGet Package : DevExpress.Win.Gantt

Declaration

csharp
public SuperToolTip SuperTip { get; set; }
vb
Public Property SuperTip As SuperToolTip

Property Value

TypeDescription
SuperToolTip

The super tooltip.

|

Remarks

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

csharp
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}
{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 { }
}
vb
Imports System.Diagnostics
Imports DevExpress.Utils
Imports DevExpress.XtraGantt

Public Sub New()
  ' ...
  AddHandler ganttControl1.TimelineTaskToolTipShowing, AddressOf GanttControl1_TimelineTaskToolTipShowing
  ' Specifies a Tooltip controller.
  ganttControl1.ToolTipController = toolTipController1
  AddHandler toolTipController1.HyperlinkClick, AddressOf ToolTipController1_HyperlinkClick
End Sub

Private Sub GanttControl1_TimelineTaskToolTipShowing(ByVal sender As Object, ByVal e As GanttTimelineTaskToolTipShowingEventArgs)
  Dim supertooltip As New SuperToolTip() With {.AllowHtmlText = DefaultBoolean.True}
  supertooltip.Items.AddTitle(e.Node("Name").ToString())
  supertooltip.Items.Add(String.Format("{0:d} - {1:d}
{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
End Sub

Private Sub ToolTipController1_HyperlinkClick(ByVal sender As Object, ByVal e As HyperlinkClickEventArgs)
  Dim process As New Process()
  process.StartInfo.FileName = (e.Link)
  process.StartInfo.Verb = "open"
  process.StartInfo.WindowStyle = ProcessWindowStyle.Normal
  Try
      process.Start()
  Catch
  End Try
End Sub

See Also

Hints and Tooltips

Text

GanttTimelineTaskToolTipShowingEventArgs Class

GanttTimelineTaskToolTipShowingEventArgs Members

DevExpress.XtraGantt Namespace