Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>2006-03-06 21:48:34 +0300
committerPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>2006-03-06 21:48:34 +0300
commit56625c7d627911e104266592739c4ac0107b1f45 (patch)
tree459d79dd5901caa0f18bd137bc5ec32dc4faebf0 /mcs
parentfcc04d2f3258044c76d3960d919dd4304be90550 (diff)
2006-03-06 Peter Dennis Bartok <pbartok@novell.com>
* 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?) svn path=/trunk/mcs/; revision=57626
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog8
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs11
2 files changed, 19 insertions, 0 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
index c953de622ef..92687b25831 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
@@ -1,3 +1,11 @@
+2006-03-06 Peter Dennis Bartok <pbartok@novell.com>
+
+ * 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?)
+
2006-03-03 Matt Hargett <matt@use.net>
* Control.cs: implement Control.Padding
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
index 09f69a15570..5110ac9b8e9 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Splitter.cs
@@ -99,6 +99,7 @@ namespace System.Windows.Forms {
Paint += new PaintEventHandler(PaintSplitter);
Layout += new LayoutEventHandler(LayoutSplitter);
+ this.ParentChanged += new EventHandler(ReparentSplitter);
Cursor = splitter_we;
}
#endregion // Constructors
@@ -374,6 +375,11 @@ namespace System.Windows.Forms {
base.OnMouseDown (e);
// Only allow if we are set up properly
+ if (affected == null) {
+ affected = AffectedControl;
+ filler = FillerControl;
+ }
+
if (affected == null || e.Button != MouseButtons.Left) {
return;
}
@@ -647,6 +653,11 @@ namespace System.Windows.Forms {
filler = FillerControl;
}
+ private void ReparentSplitter(object sender, EventArgs e) {
+ affected = AffectedControl;
+ filler = FillerControl;
+ }
+
private void DrawDragHandle(DrawType type) {
Rectangle prev;
Rectangle current;