* ListBox.cs : don't adjust top item when SelectedIndex is set to -1. [Fixes #80428] svn path=/trunk/mcs/; revision=75022
@@ -1,3 +1,8 @@
+2007-03-27 Mike Kestner <[email protected]>
+
+ * ListBox.cs : don't adjust top item when SelectedIndex is set to -1.
+ [Fixes #80428]
2007-03-26 Everaldo Canuto <[email protected]>
* XplatUIWin32.cs: Complete NOTIFYICONDATA structure, additional fields
@@ -444,8 +444,7 @@ namespace System.Windows.Forms
else if (SelectionMode == SelectionMode.One)
UnSelectItem (selected_index, true);
- if (value < top_index)
- {
+ if (value != -1 && value < top_index) {
top_index = value;
UpdateTopItem ();
} else {
@@ -378,7 +378,6 @@ namespace MonoTests.System.Windows.Forms
#endif
[Test]
- [NUnit.Framework.Category ("NotWorking")]
public void Text_SelectionMode_One ()
{
MockItem itemA = new MockItem ("A1", 1);