|
Reported by Steve Maughan and Greg Chapman; checked by Reinier Sterkenburg
To see the erroneous behavior, create a form, drop a control
on it and set the Control's Anchor property to include all four anchor types
(akLeft..akBottom). Then set the Form's WindowState to wsMaximized. When
you run the app and show the Form, it maximizes, but the control dropped on
it stays the same size.
I believe this problem occurs because most of the special resizing code is
turned off during form loading. Note in particular
TWinControl.UpdateLastResize which appears to be crucial in saving
information for the next time AlignControls is called. If I am correct,
this problem should not be limited to setting WindowState:= wsMaximized; it
will also show up for any property changed during form loading which causes
the form to have a different size than it had in the Delphi form-designer.
I'm not sure how big a problem that may be.
Matthew Collins notes:
Also affects MDI child forms that are created with poDefault as the Forms initial position. The form takes the default size and position, but the controls on it are not resized. |