Author: pbartok
Date: 2006-03-06 14:03:16 -0500 (Mon, 06 Mar 2006)
New Revision: 57627
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
Log:
2006-03-06 Peter Dennis Bartok <[EMAIL PROTECTED]>
* Splitter.cs: In situations where the affected control is added
to the parent's control list after the splitter, we would not
populate affected. Now we try populating it on mousedown, if
it's not already set, and force it to be re-set whenever our
parent changes.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-03-06 18:48:34 UTC (rev 57626)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-03-06 19:03:16 UTC (rev 57627)
@@ -3,8 +3,8 @@
* Splitter.cs: In situations where the affected control is added
to the parent's control list after the splitter, we would not
populate affected. Now we try populating it on mousedown, if
- it's not already set. (Maybe we should always do it, at the cost
- of performance?)
+ it's not already set, and force it to be re-set whenever our
+ parent changes.
2006-03-03 Matt Hargett <[EMAIL PROTECTED]>
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
2006-03-06 18:48:34 UTC (rev 57626)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
2006-03-06 19:03:16 UTC (rev 57627)
@@ -274,6 +274,7 @@
[MWFCategory("Layout")]
public int SplitPosition {
get {
+ affected = AffectedControl;
if (affected == null) {
return -1;
}
@@ -290,6 +291,8 @@
}
set {
+ affected = AffectedControl;
+
if (Capture || (affected == null)) {
return;
}
@@ -375,7 +378,7 @@
base.OnMouseDown (e);
// Only allow if we are set up properly
- if (affected == null) {
+ if ((affected == null) || (filler == null)) {
affected = AffectedControl;
filler = FillerControl;
}
@@ -654,8 +657,8 @@
}
private void ReparentSplitter(object sender, EventArgs e) {
- affected = AffectedControl;
- filler = FillerControl;
+ affected = null;
+ filler = null;
}
private void DrawDragHandle(DrawType type) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches