[Mono-bugs] [Bug 78761][Maj] New - ListView doesn't set Font properly
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Jul 4 10:45:14 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 kuba.brecka at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=78761
--- shadow/78761 2006-07-04 10:45:14.000000000 -0400
+++ shadow/78761.tmp.25686 2006-07-04 10:45:14.000000000 -0400
@@ -0,0 +1,70 @@
+Bug#: 78761
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com
+ReportedBy: kuba.brecka at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ListView doesn't set Font properly
+
+The following code should draw a ListView with 24px font, but doesn't do
+so. Also each each row seem to have double height than it should. Reproduce:
+
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+
+namespace MonoTest8
+{
+ class Form1 : Form
+ {
+ static void Main()
+ {
+ Application.Run(new Form1());
+ }
+
+ private ListView L;
+
+ public Form1()
+ {
+ L = new ListView();
+ ColumnHeader C1 = new System.Windows.Forms.ColumnHeader();
+ ColumnHeader C2 = new System.Windows.Forms.ColumnHeader();
+ ColumnHeader C3 = new System.Windows.Forms.ColumnHeader();
+
+ C1.Width = 100;
+ C2.Width = 100;
+ C3.Width = 100;
+
+ L.Columns.Add(C1);
+ L.Columns.Add(C2);
+ L.Columns.Add(C3);
+
+ L.Font = new System.Drawing.Font("Tahoma", 24F,
+System.Drawing.FontStyle.Regular);
+
+ ListViewItem LI = new ListViewItem("Hello world");
+ LI.SubItems.Add("item2");
+ LI.SubItems.Add("item3");
+ L.Items.Add(LI);
+
+ L.View = System.Windows.Forms.View.Details;
+ L.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
+ L.FullRowSelect = true;
+
+ L.Width = 400;
+ Width = 500;
+
+ Controls.Add(L);
+ }
+ }
+}
More information about the mono-bugs
mailing list