[Mono-winforms-list] Patch for SplitContainer

Jonathan Pobst monkey at jpobst.com
Wed Jun 6 13:50:07 EDT 2007


Applied in r78773.  Thanks for the patch!

Jon


Neil Cawse wrote:
> A databinding error was occurring in our app because a Splitter higher 
> up in the parent hierarchy was returning a null BindingContext.
> 
> The splitter panel should be relying on the base class implementation 
> and simply change the attribute as per patch.
> 
>  
> 
> Index: 
> /home/neilcawse/mymono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs
> 
> ===================================================================
> 
> --- 
> /home/neilcawse/mymono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs       
> (revision 78604)
> 
> +++ 
> /home/neilcawse/mymono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs       
> (working copy)
> 
> @@ -48,7 +48,6 @@
> 
>                private int splitter_width;
> 
>                private int splitter_increment;
> 
>                private Orientation orientation;
> 
> -              private bool binding_context_set;
> 
>  
> 
>                private SplitterPanel panel1;
> 
>                private bool panel1_collapsed;
> 
> @@ -137,8 +136,7 @@
> 
>                       panel2_collapsed = false;
> 
>                       panel1_min_size = 25;
> 
>                       panel2_min_size = 25;
> 
> -                     binding_context_set = false;
> 
> -
> 
> +                    
> 
>                       panel1 = new SplitterPanel (this);
> 
>                       panel2 = new SplitterPanel (this);
> 
>                       splitter = new Splitter ();
> 
> @@ -229,11 +227,8 @@
> 
>  
> 
>                [Browsable (false)]
> 
>                public override BindingContext BindingContext {
> 
> -                     get { return binding_context_set ? 
> base.BindingContext : null; }
> 
> -                     set {
> 
> -                            binding_context_set = true;
> 
> -                            base.BindingContext = value;
> 
> -                     }
> 
> +                     get { return base.BindingContext; }
> 
> +                     set { base.BindingContext = value; }
> 
>                }
> 
>  
> 
>                // MSDN says default is Fixed3D, creating a new 
> SplitContainer says otherwise.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list



More information about the Mono-winforms-list mailing list