[Mono-winforms-list] Patch for SplitContainer
Neil Cawse
neilcawse at geotab.com
Wed Jun 6 13:27:00 EDT 2007
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20070606/80cf34f5/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SplitContainer.patch
Type: application/octet-stream
Size: 1708 bytes
Desc: SplitContainer.patch
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20070606/80cf34f5/attachment-0001.obj
More information about the Mono-winforms-list
mailing list