http://bugzilla.novell.com/show_bug.cgi?id=492815


           Summary: ContextMenuStrip Work incorrectly
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i686
        OS/Version: Ubuntu
            Status: NEW
          Severity: Blocker
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: Beta-Customer


Created an attachment (id=284463)
 --> (http://bugzilla.novell.com/attachment.cgi?id=284463)
test project

When the context menu contains ToolStripDropDownItem and a normal
ToolStripItem, the normal ToolStripItem will not function after the
ToolStripDropDown show and hide, I have attached the simple test project. Just
right click on the form and bring up the context menu.
  I am using the lastest code from svn.
  After some research, I create a simple fix to make the ToolStripItem Work,
but I don't think the fix solved the bug, it just solved my program, please
find the diff below.

Best Regards,
Jingnan Si

Index: class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
===================================================================
--- class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs   (Version
131066)
+++ class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs   (Work copy)
@@ -1521,6 +1521,12 @@
            foreach (ToolStripItem tsi2 in this.Items)
                if (tsi != tsi2)
                    tsi2.Dismiss (ToolStripDropDownCloseReason.Keyboard);
+
+           if (Application.KeyboardCapture != this) {
+               Application.KeyboardCapture = this;
+           }
+
+           KeyboardActive = true;
        }

        internal virtual bool OnMenuKey ()

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to