Author: jackson
Date: 2006-12-11 18:24:03 -0500 (Mon, 11 Dec 2006)
New Revision: 69373

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBox.cs
Log:

        * TextBox.cs: Don't tell the world that we have a context menu.
        * Control.cs: New method so that we can control whether or not
        * the
        context menu is visible outside MWF.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-12-11 23:10:20 UTC (rev 69372)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-12-11 23:24:03 UTC (rev 69373)
@@ -2,6 +2,9 @@
 
        * TextBoxBase.cs: We need to cap this value, since Maximum -
        ViewPortHeight can be less than zero.
+       * TextBox.cs: Don't tell the world that we have a context menu.
+       * Control.cs: New method so that we can control whether or not the
+       context menu is visible outside MWF.
 
 2006-12-11  Everaldo Canuto  <[EMAIL PROTECTED]>
 

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2006-12-11 23:10:20 UTC (rev 69372)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs       
2006-12-11 23:24:03 UTC (rev 69373)
@@ -1833,7 +1833,7 @@
                [MWFCategory("Behavior")]
                public virtual ContextMenu ContextMenu {
                        get {
-                               return context_menu;
+                               return GetContextMenuInternal ();
                        }
 
                        set {
@@ -1844,6 +1844,11 @@
                        }
                }
 
+               internal virtual ContextMenu GetContextMenuInternal ()
+               {
+                       return context_menu;
+               }
+
                [Browsable(false)]
                
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
                public ControlCollection Controls {

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBox.cs       
2006-12-11 23:10:20 UTC (rev 69372)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBox.cs       
2006-12-11 23:24:03 UTC (rev 69373)
@@ -273,6 +273,15 @@
                #endregion      // Events
 
                #region Private Methods
+
+               internal override ContextMenu GetContextMenuInternal ()
+               {
+                       ContextMenu  res = base.GetContextMenuInternal ();
+                       if (res == menu)
+                               return null;
+                       return res;
+               }
+
                private void menu_Popup(object sender, EventArgs e) {
                        if (SelectionLength == 0) {
                                cut.Enabled = false;

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

Reply via email to