windowsforms-devexpress-dot-xtragantt-dot-gantttimelinetasktooltipshowingeventargs.md
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
public SuperToolTip SuperTip { get; set; }
Public Property SuperTip As SuperToolTip
| Type | Description |
|---|---|
| SuperToolTip |
The super tooltip.
|
The following example demonstrates how to display a super tooltip for tasks displayed on the timeline:
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 { }
}
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
GanttTimelineTaskToolTipShowingEventArgs Class