Browse Source

2008-12-17 Bill Holmes <[email protected]>

	* ListViewItem.cs (ListViewSubItem.ctor): Initalizing the 
	  SubItemStyle member field. 

	Contributed under MIT/X11 license.

2008-12-17  Jonathan Pobst  <[email protected]>

	* ListViewItemTest.cs: Add test for empty constructor.

svn path=/trunk/mcs/; revision=121709
Jonathan Pobst 17 years ago
parent
commit
52ebdf367e

+ 7 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,10 @@
+2008-12-17  Bill Holmes  <[email protected]>
+
+	* ListViewItem.cs (ListViewSubItem.ctor): Initalizing the 
+	  SubItemStyle member field. 
+
+	Contributed under MIT/X11 license.
+
 2008-12-16  Carlos Alberto Cortez <[email protected]>
 
 	* ListBox.cs: In MultiColumn mode don't use top_index to calculate the

+ 2 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListViewItem.cs

@@ -1223,6 +1223,8 @@ namespace System.Windows.Forms
 			
 			#region Public Constructors
 			public ListViewSubItem ()
+				: this (null, string.Empty, Color.Empty,
+					Color.Empty, null)
 			{
 			}
 

+ 4 - 0
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog

@@ -1,3 +1,7 @@
+2008-12-17  Jonathan Pobst  <[email protected]>
+
+	* ListViewItemTest.cs: Add test for empty constructor.
+
 2008-12-15  Mario Carrion <[email protected]>
 
 	* ControlTest.cs: New test added: AccessibilityPropertiesTest to test

+ 3 - 0
mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewItemTest.cs

@@ -701,6 +701,9 @@ namespace MonoTests.System.Windows.Forms
 		{
 			ListViewItem.ListViewSubItem subItem = new ListViewItem.ListViewSubItem ();
 			Assert.AreEqual (string.Empty, subItem.Text, "#1");
+			Assert.AreEqual (SystemColors.Window, subItem.BackColor, "#2");
+			Assert.AreEqual (SystemColors.WindowText, subItem.ForeColor, "#3");
+			Assert.AreEqual (SystemFonts.DefaultFont, subItem.Font, "#4");
 		}
 
 		[Test] // ctor (ListViewItem, String)