[Mono-dev] TableLayout problem in winforms between Win32 (.NET) and mono
Jonathan Pobst
monkey at jpobst.com
Thu Nov 13 15:08:27 EST 2008
Please file a bug. Thanks!
Jon
Paul wrote:
> Hi,
>
> I've built an application which runs happily under Win32 and mono. The
> design work was done under VS C# 2008, was compiled on there and tested
> on both my Linux (fedora) boxes and an XP box.
>
> On XP, everything works fine. Under Linux, the text boxes are not
> correctly sized.
>
> The setup code from the Win designer for the table is this
>
> this.table.ColumnCount = 6;
> this.table.ColumnStyles.Add(new
> System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute,
> 60F));
> this.table.ColumnStyles.Add(new
> System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent,
> 25F));
> this.table.ColumnStyles.Add(new
> System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent,
> 25F));
> this.table.ColumnStyles.Add(new
> System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent,
> 25F));
> this.table.ColumnStyles.Add(new
> System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent,
> 25F));
> this.table.ColumnStyles.Add(new
> System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute,
> 40F));
> this.table.Controls.Add(this.checkBox4, 5, 4);
> this.table.Controls.Add(this.checkBox3, 5, 3);
> this.table.Controls.Add(this.checkBox2, 5, 2);
> this.table.Controls.Add(this.diff4, 4, 4);
> this.table.Controls.Add(this.ass4, 3, 4);
> this.table.Controls.Add(this.teach4, 2, 4);
> this.table.Controls.Add(this.active4, 1, 4);
> this.table.Controls.Add(this.diff3, 4, 3);
> this.table.Controls.Add(this.ass3, 3, 3);
> this.table.Controls.Add(this.teach3, 2, 3);
> this.table.Controls.Add(this.active3, 1, 3);
> this.table.Controls.Add(this.diff2, 4, 2);
> this.table.Controls.Add(this.ass2, 3, 2);
> this.table.Controls.Add(this.teach2, 2, 2);
> this.table.Controls.Add(this.active2, 1, 2);
> this.table.Controls.Add(this.diff1, 4, 1);
> this.table.Controls.Add(this.ass1, 3, 1);
> this.table.Controls.Add(this.teach1, 2, 1);
> this.table.Controls.Add(this.label6, 5, 0);
> this.table.Controls.Add(this.label5, 4, 0);
> this.table.Controls.Add(this.label4, 3, 0);
> this.table.Controls.Add(this.label3, 2, 0);
> this.table.Controls.Add(this.label2, 1, 0);
> this.table.Controls.Add(this.label1, 0, 0);
> this.table.Controls.Add(this.numericUpDown1, 0, 1);
> this.table.Controls.Add(this.numericUpDown2, 0, 2);
> this.table.Controls.Add(this.numericUpDown3, 0, 3);
> this.table.Controls.Add(this.numericUpDown4, 0, 4);
> this.table.Controls.Add(this.active1, 1, 1);
> this.table.Controls.Add(this.checkBox1, 5, 1);
> this.table.Location = new System.Drawing.Point(6, 6);
> this.table.Name = "table";
> this.table.RowCount = 5;
> this.table.RowStyles.Add(new
> System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute,
> 20F));
> this.table.RowStyles.Add(new
> System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent,
> 25F));
> this.table.RowStyles.Add(new
> System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent,
> 25F));
> this.table.RowStyles.Add(new
> System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent,
> 25F));
> this.table.RowStyles.Add(new
> System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent,
> 25F));
> this.table.Size = new System.Drawing.Size(605, 202);
> this.table.TabIndex = 1;
>
> So, as you can see, the table width is 605, two columns make 100 leaving
> 505, there is a gap between each cell so the largest textbox there can
> be is 495 in length).
>
> The window itself has a radio button which that does the following
>
> 1. Makes all except active1-4 visible=false
> 2. Sets the column span to 4
> 3. Makes the active1-4 textboxes 495,39
>
> The other radio button does the reverse.
>
> The problem is that under Linux there are gaps where they shouldn't be.
>
> I've uploaded two screenshots showing what is happening
>
> http://www.all-the-johnsons.co.uk/mono-bugs/ofstead.png
> http://www.all-the-johnsons.co.uk/mono-bugs/standardview.png
>
> Is this a known bug or do I need to put it into BZ?
>
> TTFN
>
> Paul
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list