Example #1
0
 internal void OnShowToolTip()
 {
     if (ShowToolTip != null && !owner.Capture)
     {
         Control             c     = GetFocus();
         Point               local = c.PointToClient(Cursor.Position);
         IntelliTipEventArgs args  = new IntelliTipEventArgs();
         args.Type     = this.type;
         args.Focus    = c;
         args.Location = local;
         ShowToolTip(this, args);
         string toolTip = args.ToolTip;
         if (!string.IsNullOrEmpty(toolTip))
         {
             this.tip.ShowAlways = true;
             this.tip.Active     = true;
             Point p = args.Location;
             if (p.X == local.X && p.Y == local.Y)
             {
                 p.Y += 10;
                 p.Y += 10;
             }
             this.tipTime = Environment.TickCount;
             showing      = c;
             this.tip.Show(WordWrap(toolTip), (IWin32Window)c, p);
             return;
         }
     }
     this.tip.Hide(owner);
     this.type = TipRequestType.Default;
 }
Example #2
0
 //=============================== Private methods ===============================
 void popupDelay_Tick(object sender, EventArgs e)
 {
     this.type = TipRequestType.Hover;
     popupDelay.Stop();
     this.owner.Invoke(new EventHandler(OnPopupDelay), new object[] { this, EventArgs.Empty });
 }
 void OnWatchMouseHover(object sender, EventArgs e)
 {
     this.type = TipRequestType.Hover;
     Start();
 }
Example #4
0
 void OnWatchMouseHover(object sender, EventArgs e)
 {
     this.type = TipRequestType.Hover;
     Start();
 }
Example #5
0
        internal void OnShowToolTip()
        {
            this.type = TipRequestType.Default;
            lastHover = new Rectangle(Cursor.Position, Size.Empty);
            lastHover.Inflate(10, 10);
            resetpending = true;

            if (ShowToolTip != null && !owner.Capture) {
                Control c = GetFocus();
                Point local = c.PointToClient(Cursor.Position);
                IntelliTipEventArgs args = new IntelliTipEventArgs();
                args.Type = this.type;
                args.Focus = c;
                args.Location = local;
                ShowToolTip(this, args);
                string toolTip = args.ToolTip;
                if (!string.IsNullOrEmpty(toolTip)) {
                    this.tip.ShowAlways = true;
                    this.tip.Active = true;
                    Point p = args.Location;
                    if (p.X == local.X && p.Y == local.Y) {
                        p.Y += 10;
                        p.Y += 10;
                    }
                    this.tipTime = Environment.TickCount;
                    showing = c;
                    this.tip.Show(WordWrap(toolTip), (IWin32Window)c, p);
                    return;
                }
            }
            this.tip.Hide(owner);
        }
Example #6
0
 //=============================== Private methods ===============================
 void popupDelay_Tick(object sender, EventArgs e)
 {
     this.type = TipRequestType.Hover;
     popupDelay.Stop();
     this.owner.Invoke(new EventHandler(OnPopupDelay), new object[] { this, EventArgs.Empty });
 }