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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=79190 --- shadow/79190 2006-08-27 17:25:19.000000000 -0400 +++ shadow/79190.tmp.24098 2006-08-27 17:25:19.000000000 -0400 @@ -0,0 +1,70 @@ +Bug#: 79190 +Product: Mono: Class Libraries +Version: 1.1 +OS: GNU/Linux [Other] +OS Details: Slackware, KDE +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: Windows.Forms +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Setting Control.Top after Control.Location doesn't work + +This is a very weird bug, and it seems it only happens on Linux (I am able +to reproduce it on Slackware Linux, using KDE). Using SVN head, the +following code reproduces the bug. + +Excepted result: +When you click the first button, the second button should move to the left +of the first one. When you click the first button again, nothing should +happen. This is how the program behaves on Windows, using both Mono and MS.NET. + +Actual result (on Linux): +When you click the first button, the second button moves to the left of the +first one. But when you click the first button again, the second button +moves 15px to the bottom. When you click it again, it moves back. It seems +like every second time the marked line in the code is ignored. + +Reproduce code: +using System; +using System.Drawing; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace MonoTest22 +{ + public class Form1 : Form + { + static void Main() + { + Application.Run(new Form1()); + } + + Button B1, B2; + public Form1() + { + B1 = new Button(); + B1.Location = new Point(0, 0); + B1.Size = new Size(150, 30); + B1.Click += new EventHandler(B1_Click); + Controls.Add(B1); + + B2 = new Button(); + B2.Location = new Point(0, 30); + B2.Size = new Size(150, 30); + Controls.Add(B2); + } + + void B1_Click(object sender, EventArgs e) + { + B2.Location = new Point(150, 15); + B2.Top -= 15; // MARKED LINE + } + } +} _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
