[Mono-bugs] [Bug 78727][Nor] New - ListView: setting View = .Details in prior to columns
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jun 29 01:22:49 EDT 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by atsushi at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=78727
--- shadow/78727 2006-06-29 01:22:49.000000000 -0400
+++ shadow/78727.tmp.10679 2006-06-29 01:22:49.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 78727
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: mkestner at ximian.com
+ReportedBy: atsushi at ximian.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ListView: setting View = .Details in prior to columns
+
+In the example code below, ListView.View property is set in prior to adding
+a column header, and it causes wrong painting that 1) on Linux the first
+item is drawn under the column header, and 2) on Windows the column header
+is shifted to wrong place, like, around the second column.
+
+
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+
+public class Test : Form
+{
+ public static void Main ()
+ {
+ Application.Run (new Test ());
+ }
+
+ public Test ()
+ {
+ ListView lv = new ListView ();
+ lv.View = System.Windows.Forms.View.Details;
+ lv.Columns.Add (new ColumnHeader ());
+ lv.Items.Add (new ListViewItem ("item"));
+ lv.Items.Add (new ListViewItem ("item"));
+ Controls.Add (lv);
+ }
+}
+
+If you set View property *after* Columns.Add(), it works fine.
More information about the mono-bugs
mailing list