Author: calberto
Date: 2007-03-26 18:21:54 -0500 (Mon, 26 Mar 2007)
New Revision: 74997
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs
Log:
2007-03-26 Carlos Alberto Cortez <[EMAIL PROTECTED]>
* ListViewItem.cs: In the constructors that take
an array of strings, don't use ListViewSubItemCollection.AddRange
method to add items, since we need to have a different behaviour (in
the constructors we add an item for each null string, opposed to
the behaviour of AddRange, which adds nothing).
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-03-26 22:36:59 UTC (rev 74996)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-03-26 23:21:54 UTC (rev 74997)
@@ -1,3 +1,11 @@
+2007-03-26 Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+ * ListViewItem.cs: In the constructors that take
+ an array of strings, don't use ListViewSubItemCollection.AddRange
+ method to add items, since we need to have a different behaviour (in
+ the constructors we add an item for each null string, opposed to
+ the behaviour of AddRange, which adds nothing).
+
2007-03-26 Andreia Gaita <[EMAIL PROTECTED]>
* NumericUpDown.cs: Fix broken 1.1 api for ParseEditText
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs
2007-03-26 22:36:59 UTC (rev 74996)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs
2007-03-26 23:21:54 UTC (rev 74997)
@@ -98,7 +98,8 @@
public ListViewItem (string [] items, int imageIndex)
{
this.sub_items = new ListViewSubItemCollection (this);
- this.sub_items.AddRange (items);
+ foreach (string item in items) // Don't use AddRange,
since we need to add null strings
+ sub_items.Add (item);
this.image_index = imageIndex;
}
@@ -106,7 +107,8 @@
Color backColor, Font font)
{
this.sub_items = new ListViewSubItemCollection (this);
- this.sub_items.AddRange (items);
+ foreach (string item in items)
+ sub_items.Add (item);
this.image_index = imageIndex;
ForeColor = foreColor;
BackColor = backColor;
@@ -134,7 +136,8 @@
Color backColor, Font font) : this()
{
this.sub_items = new ListViewSubItemCollection(this);
- this.sub_items.AddRange(items);
+ foreach (string item in items)
+ sub_items.Add (item);
ForeColor = foreColor;
BackColor = backColor;
this.font = font;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches