[Mono-bugs] [Bug 80289][Nor] Changed - Control.Anchor does not seem to always work
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Dec 18 04:40:13 EST 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 georgegiolfan at yahoo.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80289
--- shadow/80289 2006-12-17 16:30:55.000000000 -0500
+++ shadow/80289.tmp.3806 2006-12-18 04:40:13.000000000 -0500
@@ -2,13 +2,13 @@
Product: Mono: Class Libraries
Version: 1.2
OS: Windows XP
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: Windows.Forms
AssignedTo: toshok at ximian.com
ReportedBy: georgegiolfan at yahoo.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
@@ -41,6 +41,40 @@
Expected Results:
Button in bottom right corner.
How often does this happen?
Always (on 1.2.2.1 and also when using the monocharge 20061217 version of
System.Windows.Forms.dll
+
+------- Additional Comments From georgegiolfan at yahoo.com 2006-12-18 04:40 -------
+Here is a possible temporary (inefficent) fix, although it may break
+other things.
+Control.UpdateDistances should do its job even if the layout is
+suspended:
+Replace
+if ((parent != null) && (parent.layout_suspended == 0)) {
+with
+if (parent != null) {
+Also in Control.ResumeLayout(bool performLayout), I put a call to
+PerformLayout (one may be able to bo better) before calling
+UpdateDistances on children.
+
+ public void ResumeLayout(bool performLayout) {
+ if (layout_suspended > 0) {
+ layout_suspended--;
+ }
+
+ if (layout_suspended == 0) {
+ Control [] controls =
+child_controls.GetAllControls ();
+//Added this line
+PerformLayout();
+ for (int i = 0; i < controls.Length; i++) {
+ controls [i].UpdateDistances ();
+ }
+
+ if (performLayout && layout_pending) {
+ PerformLayout();
+ }
+ }
+ }
+
More information about the mono-bugs
mailing list