X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FManaged.Windows.Forms%2FSystem.Windows.Forms%2FContainerControl.cs;h=7483eeda8efa70ace9daeb4793cf662b6964fb14;hb=426893c54bdcc14cc32022c3cb9258340b1d150d;hp=20133b043c0c7509bec2d9783e3568694aae2e35;hpb=a1d40c4b8a89acf0dd2ad0415f4c7baa45c22130;p=mono.git diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs index 20133b043c0..7483eeda8ef 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ContainerControl.cs @@ -69,7 +69,7 @@ namespace System.Windows.Forms { } set { - if (value==null || (active_control == value)) { + if (value==null || (active_control == value && active_control.Focused)) { return; } @@ -393,6 +393,16 @@ namespace System.Windows.Forms { OnBindingContextChanged (EventArgs.Empty); } +#if NET_2_0 + protected override bool ProcessCmdKey (ref Message msg, Keys keyData) + { + if (ToolStripManager.ProcessCmdKey (ref msg, keyData) == true) + return true; + + return base.ProcessCmdKey (ref msg, keyData); + } +#endif + [EditorBrowsable (EditorBrowsableState.Advanced)] protected override bool ProcessDialogChar(char charCode) { if (GetTopLevel()) { @@ -478,10 +488,7 @@ namespace System.Windows.Forms { if (Parent != null) { IContainerControl parent = Parent.GetContainerControl (); if (parent != null) { - if (!(directed && auto_select_child)) - ContainerSelected = true; - if (!(this.Parent.ContainerSelected)) - parent.ActiveControl = this; + parent.ActiveControl = this; } } @@ -498,12 +505,6 @@ namespace System.Windows.Forms { protected override void WndProc(ref Message m) { switch ((Msg) m.Msg) { - case Msg.WM_LBUTTONDOWN: - OnMouseDown (new MouseEventArgs (FromParamToMouseButtons ((int) m.WParam.ToInt32()), - mouse_clicks, LowOrder ((int) m.LParam.ToInt32 ()), - HighOrder ((int) m.LParam.ToInt32 ()), 0)); - break; - case Msg.WM_SETFOCUS: if (active_control != null) Select (active_control); @@ -541,7 +542,16 @@ namespace System.Windows.Forms { base.OnFontChanged (e); } + protected override void OnLayout (LayoutEventArgs levent) + { + base.OnLayout (levent); + } + AutoValidate auto_validate = AutoValidate.Inherit; + + [Browsable (false)] + [AmbientValue (AutoValidate.Inherit)] + [EditorBrowsable (EditorBrowsableState.Never)] public virtual AutoValidate AutoValidate { get { return auto_validate; @@ -565,6 +575,8 @@ namespace System.Windows.Forms { eh (this, e); } + [Browsable (false)] + [EditorBrowsable (EditorBrowsableState.Never)] public event EventHandler AutoValidateChanged { add { Events.AddHandler (OnValidateChanged, value); } remove { Events.RemoveHandler (OnValidateChanged, value); }