Author: everaldo
Date: 2006-11-08 07:35:48 -0500 (Wed, 08 Nov 2006)
New Revision: 67513

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
Log:
Remove tooltips when ToolButton click events.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-08 12:34:58 UTC (rev 67512)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-08 12:35:48 UTC (rev 67513)
@@ -1,5 +1,10 @@
 2006-11-07  Everaldo Canuto  <[EMAIL PROTECTED]>
 
+       * Toolbar.cs: Prevent toolbar to open more than one tooltip at same
+       time. Remove tooltips when ToolButton click events.  Fixes #79856.
+
+2006-11-07  Everaldo Canuto  <[EMAIL PROTECTED]>
+
        * MenuAPI.cs: Ignore right click for menu actions and fixes
        menu border when clicked.  Fixes #79846.
 

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs       
2006-11-08 12:34:58 UTC (rev 67512)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolBar.cs       
2006-11-08 12:35:48 UTC (rev 67513)
@@ -596,6 +596,15 @@
 
                        Point loc = new Point (me.X, me.Y);
 
+                       if (ButtonAtPoint (loc) == null)
+                               return;
+                       
+                       // Hide tooltip when left mouse button 
+                       if ((tip_window != null) && (tip_window.Visible) && 
((me.Button & MouseButtons.Left) == MouseButtons.Left)) {
+                               TipDownTimer.Stop ();
+                               tip_window.Hide ();
+                       }
+                       
                        // draw the pushed button
                        foreach (ToolBarButton button in buttons) {
                                if (button.Enabled && button.Rectangle.Contains 
(loc)) {
@@ -688,7 +697,8 @@
                        if (Capture)
                                return;
 
-                       tip_window = new ToolTip.ToolTipWindow ();
+                       if (tip_window == null)
+                               tip_window = new ToolTip.ToolTipWindow ();
 
                        ToolBarButton btn = ButtonAtPoint (PointToClient 
(Control.MousePosition));
                        current_button = btn;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to