Author: mkestner
Date: 2006-11-09 16:25:52 -0500 (Thu, 09 Nov 2006)
New Revision: 67646
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewEventTest.cs
Log:
2006-11-09 Mike Kestner <[EMAIL PROTECTED]>
* ListView.cs : raise SelectedIndexChanged when an item is selected
programmatically via the Item.Selected property. Gert's nice
ListViewSelectedIndexChanged test fixture now runs clean.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-09 21:24:29 UTC (rev 67645)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-11-09 21:25:52 UTC (rev 67646)
@@ -1,5 +1,11 @@
2006-11-09 Mike Kestner <[EMAIL PROTECTED]>
+ * ListView.cs : raise SelectedIndexChanged when an item is selected
+ programmatically via the Item.Selected property. Gert's nice
+ ListViewSelectedIndexChanged test fixture now runs clean.
+
+2006-11-09 Mike Kestner <[EMAIL PROTECTED]>
+
* ListView.cs : raise SelectedIndexChanged when a selected item is
removed from the item collection using Remove or RemoveAt.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
2006-11-09 21:24:29 UTC (rev 67645)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
2006-11-09 21:25:52 UTC (rev 67646)
@@ -663,6 +663,12 @@
}
}
+ internal void OnSelectedIndexChanged ()
+ {
+ if (IsHandleCreated)
+ OnSelectedIndexChanged (EventArgs.Empty);
+ }
+
internal int TotalWidth {
get { return Math.Max (this.Width, this.layout_wd); }
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs
2006-11-09 21:24:29 UTC (rev 67645)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs
2006-11-09 21:25:52 UTC (rev 67646)
@@ -271,6 +271,7 @@
// force re-population of list
owner.SelectedItems.Reset ();
Layout ();
+ owner.OnSelectedIndexChanged ();
} else {
selected = value;
}
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewEventTest.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewEventTest.cs
2006-11-09 21:24:29 UTC (rev 67645)
+++
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewEventTest.cs
2006-11-09 21:25:52 UTC (rev 67646)
@@ -298,7 +298,6 @@
}
[Test]
- [Category ("NotWorking")]
public void AddAndSelectItem ()
{
Form form = new Form ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches