Author: jordi
Date: 2005-04-28 06:39:20 -0400 (Thu, 28 Apr 2005)
New Revision: 43709
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/System.Windows.Forms/ListControl.cs
Log:
2005-04-28 Jordi Mas i Hernandez <[EMAIL PROTECTED]>
* ListControl.cs: honors OnPositionChanged and default Selected Item
* ListBox.cs: unselect items when clearing
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-04-28 09:19:03 UTC (rev 43708)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-04-28 10:39:20 UTC (rev 43709)
@@ -1,3 +1,8 @@
+2005-04-28 Jordi Mas i Hernandez <[EMAIL PROTECTED]>
+
+ * ListControl.cs: honors OnPositionChanged and default Selected Item
+ * ListBox.cs: unselect items when clearing
+
2005-04-27 Jackson Harper <[EMAIL PROTECTED]>
* X11Keyboard.cs: Initialize a default keyboard and give a warning
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
2005-04-28 09:19:03 UTC (rev 43708)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
2005-04-28 10:39:20 UTC (rev 43709)
@@ -1942,8 +1942,10 @@
public virtual void Clear ()
{
+ owner.selected_index = -1;
+ owner.focused_item = -1;
object_items.Clear ();
- listbox_items.Clear ();
+ listbox_items.Clear ();
owner.UpdateItemInfo (UpdateOperation.AllItems,
0, 0);
}
public virtual bool Contains (object obj)
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
2005-04-28 09:19:03 UTC (rev 43708)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
2005-04-28 10:39:20 UTC (rev 43709)
@@ -229,6 +229,7 @@
if (DataManager != null) {
SetItemsCore (DataManager.List);
+ SelectedIndex = DataManager.Position;
}
}
@@ -300,12 +301,11 @@
data_manager = (CurrencyManager) BindingContext
[data_source, ValueMember];
data_manager.PositionChanged += new EventHandler
(OnPositionChanged);
- }
+ }
- //TODO: See bug 74744
private void OnPositionChanged (object sender, EventArgs e)
- {
-
+ {
+ SelectedIndex = data_manager.Position;
}
#endregion Private Methods
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches