[Mono-bugs] [Bug 82762][Min] New - Anchoring: when is None, control more than expected half distance

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Sep 9 11:02:17 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 andyhume32 at yahoo.co.uk.


--- shadow/82762	2007-09-09 11:02:17.000000000 -0400
+++ shadow/82762.tmp.9338	2007-09-09 11:02:17.000000000 -0400
@@ -0,0 +1,45 @@
+Bug#: 82762
+Product: Mono: Class Libraries
+Version: 1.2
+OS Details: 
+Status: NEW   
+Priority: Minor
+Component: Windows.Forms
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: andyhume32 at yahoo.co.uk               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Anchoring: when is None, control more than expected half distance
+MSDN's page on the AnchorStyles enumeration says:
+"If a control has its Anchor property set to AnchorStyles.None, the 
+control moves half of the distance that the container of the control is 
+resized. ..."  And this (apparently) applies plane by plane, so if a 
+control is anchored in the horizontal plane then the 'half distance' rule 
+is applied in the vertical direction and vice versa.
+Mono does not show this behaviour.  It seems that the movement is more 
+than half.  This is most obvious when the Form is increased in size and 
+then restored to the original size, it is clear then that the controls 
+are not returned to the same point they started at.
+Repro is the "Anchoring All Edges" child-form ./ch04_Layout/LayoutSample 
+from the sample code for the book "Windows Forms 2.0 Programming," by 
+Chris Sells and Michael Weinhardt, sources available from 
+Tested on SVN head on Win32, 1.2.5_5 Win32 and 1.2.5_5 Suse VM.
+The simplest repro is to maximize the form and then un-maximize it.  The 
+singly-anchored buttons do not return to their starting positions.  (The 
+form/dialog does not have maximize icons in Linux -- expected??)
+Also, on comparing the resized window with the MSFT equivalent shows also 
+that the fault is that the singly-anchored buttons move too great a 

More information about the mono-bugs mailing list