Author: mkestner
Date: 2007-03-27 10:12:58 -0500 (Tue, 27 Mar 2007)
New Revision: 75023
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
Log:
2007-03-27 Mike Kestner <[EMAIL PROTECTED]>
* ListBox.cs : don't perform invalidations if the handle hasn't been
created. [Fixes #80753]
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-03-27 14:55:54 UTC (rev 75022)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-03-27 15:12:58 UTC (rev 75023)
@@ -1,5 +1,10 @@
2007-03-27 Mike Kestner <[EMAIL PROTECTED]>
+ * ListBox.cs : don't perform invalidations if the handle hasn't been
+ created. [Fixes #80753]
+
+2007-03-27 Mike Kestner <[EMAIL PROTECTED]>
+
* ListBox.cs : don't adjust top item when SelectedIndex is set to -1.
[Fixes #80428]
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
2007-03-27 14:55:54 UTC (rev 75022)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
2007-03-27 15:12:58 UTC (rev 75023)
@@ -1479,6 +1479,8 @@
internal void InvalidateItem (int index)
{
+ if (!IsHandleCreated)
+ return;
Rectangle bounds = GetItemDisplayRectangle (index,
top_index);
if (ClientRectangle.IntersectsWith (bounds))
Invalidate (bounds);
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
2007-03-27 14:55:54 UTC (rev 75022)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
2007-03-27 15:12:58 UTC (rev 75023)
@@ -248,7 +248,6 @@
}
[Test] // bug #80696
- [NUnit.Framework.Category ("NotWorking")]
public void SelectedIndex_Created ()
{
Form form = new Form ();
@@ -268,7 +267,6 @@
}
[Test] // bug #80753
- [NUnit.Framework.Category ("NotWorking")]
public void SelectedIndex_NotCreated ()
{
ListBox listBox = new ListBox ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches