4

In my application I want to use a tooltip to point at a label to get the users attention:

toolTip.IsBalloon = true;
toolTip.Show("message", label1);

The problem is that the balloon isn't pointing at the specified label. What should I do?

Jim Counts
  • 12,535
  • 9
  • 45
  • 63
Muhammad Ali Dildar
  • 1,467
  • 6
  • 24
  • 35

3 Answers3

10

This is a known bug.

Try calling it twice for a hack work-around:

toolTip.Show(string.Empty, label1, 0);
toolTip.Show("message", label1);
LarsTech
  • 80,625
  • 14
  • 153
  • 225
1

You can do something like this.. more specific (i.e) how much time the tool tip will be displayed...

When MouseLeave

   public class MouseLeave
   {
       public void mouseLeave(Label label1, ToolTip ttpTemp)
       {
          ttpTemp.Hide(label1);
       }
  }

when mouse enter

  public class MouseOver
  {
    public void mouseOver(Label label1, ToolTip ttpTemp)
    {
                    ttpTemp.AutoPopDelay = 2000;
                    ttpTemp.InitialDelay = 1000;
                    ttpTemp.ReshowDelay = 500;
                    ttpTemp.IsBalloon = true;
                    ttpTemp.SetToolTip(label1, "Message1");
                    ttpTemp.Show("message1", label1,label1.width,label1.height/10,5000);
      }
   }
Glory Raj
  • 17,397
  • 27
  • 100
  • 203
0

Tooltip works with MouseHover and MouseLeft [just imagine in this way] If the mouse come over the Label, the tooltip will be displayed, when the mouse left, tooltip will dissappear.

and the code should be:

    ToolTip t = new ToolTip();
    t.IsBalloon = true;
    t.ToolTipTitle = "Title";
    t.SetToolTip(label1, "Text");

just ToolTipTitle is optional :)

icaptan
  • 1,495
  • 1
  • 16
  • 36