[Mono-bugs] [Bug 82605][Wis] Changed - Label: cant be align to midlle center
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Aug 28 10:10:45 EDT 2007
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 everaldo at simios.org.
http://bugzilla.ximian.com/show_bug.cgi?id=82605
--- shadow/82605 2007-08-28 10:08:56.000000000 -0400
+++ shadow/82605.tmp.13839 2007-08-28 10:10:45.000000000 -0400
@@ -191,6 +191,86 @@
is is latest monodevelop related or latest mono rt (so the mcs or gmcs) ?
------- Additional Comments From everaldo at simios.org 2007-08-28 10:08 -------
Got a problem!
If you remove the AutoSize = true from label it works fine under
windows, do it is a bug, I create a test sample to reproduce the problem.
+
+------- Additional Comments From everaldo at simios.org 2007-08-28 10:10 -------
+this shows the problem:
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+ [STAThread]
+ static void Main ()
+ {
+ Application.Run (new MainForm ());
+ }
+
+ public MainForm ()
+ {
+ Label l = new Label ();
+
+ TableLayoutPanel table = new TableLayoutPanel ();
+ table.ColumnCount = 1;
+
+ table.ColumnStyles.Add(new
+System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent,
+100F));
+
+ table.Controls.Add(l, 0, 1);
+
+ table.Dock = System.Windows.Forms.DockStyle.Fill;
+
+ table.Location = new System.Drawing.Point(0, 0);
+
+ table.Name = "tableLayoutPanel1";
+
+ table.RowCount = 2;
+
+ table.RowStyles.Add(new
+System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent,
+100F));
+
+ table.RowStyles.Add(new
+System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute,
+20F));
+
+ table.Size = new System.Drawing.Size(584, 369);
+
+ table.TabIndex = 2;
+
+
+
+ l.Anchor =
+((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left
+| System.Windows.Forms.AnchorStyles.Right)));
+
+ l.AutoEllipsis = true;
+
+ l.AutoSize = true;
+
+ l.Location = new System.Drawing.Point(3, 352);
+
+ l.Name = "LblVers";
+
+ l.Size = new System.Drawing.Size(578, 13);
+
+ l.TabIndex = 1;
+
+ l.Text = "label1";
+
+ l.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+
+ Controls.Add (table);
+ this.ClientSize = new System.Drawing.Size(584, 369);
+
+ }
+}
+
+
+Works under .net, on Mono to works we need to comment "l.AutoSize =
+true". We must fix it.
More information about the mono-bugs
mailing list