Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Tooltip position
posted

Hello,

My question is about task bar tooltips.

Is there a way to display the tooltip at the exact position of the mouse instead of at the end of the task?

When a task is very long, the tooltip is displayed very far for the mouse pointer.

Thanks.


  • 53790
    Verified Answer
    posted

    Hello Vincent,

    There are different approaches to solve this task. Here are few possible solutions:

    Option 1:

    private void ultraGanttView1_TaskToolTipDisplaying(object sender, Infragistics.Win.UltraWinGanttView.TaskToolTipDisplayingEventArgs e)

    {

       ToolTipInfo ttInfo =e.ToolTipInfo;

         ttInfo.Location =new Point(MousePosition.X, MousePosition.Y);

         e.ToolTipInfo = ttInfo;

    }

    Option 2: You could use UltraToolTipManager. By this way you could customize your tooltip. For example:

    private void ultraGanttView1_TaskToolTipDisplaying(object sender, Infragistics.Win.UltraWinGanttView.TaskToolTipDisplayingEventArgse)

    {

        e.Cancel =true;

       ultraToolTipManager1.SetUltraToolTip(ultraGanttView1,new Infragistics.Win.UltraWinToolTip.UltraToolTipInfo("This is my custom tooltip", ToolTipImage.Info, "My Title", DefaultableBoolean.True));

      ultraToolTipManager1.ShowToolTip(ultraGanttView1);

    }

    Please take  a look at the attached screenshot to see the results