When a form is started as wsMaximized height and width report design time values
Original Reporter info from Mantis: martinhoare
-
Reporter name: Martin Hoare
Original Reporter info from Mantis: martinhoare
- Reporter name: Martin Hoare
Description:
When a form is started with property windowstate set to wsMaximized, the form starts maximised, but the values of Form.Width and Form.Height reflect the design time value.
Steps to reproduce:
Create an application with a form. Drop a panel on the form. Put its left hand side against the left of the form. Add this code to form event show:
procedure TForm1.FormShow(Sender: TObject);
begin
Panel1.Width:=Form1.Width-15;
end;
Run the application and the panel will be almost the same width as the form.
Now change the form's WindowState to wsMaximized and run the application again. The form will appear as mazimised, but the panel will be the same size as before.
Additional information:
Does the same on Windows.
Mantis conversion info:
- Mantis ID: 21119
- OS: Ubuntu
- OS Build: 11.10
- Platform: Linux
- Fixed in revision: 36106 (#30681291), r61997 (#a5cca7c6), r62113 (#106e142a)
- Monitored by: » januszt29@interia.pl (Janusz Tomczak), » mike.cornflake (Mike Thompson)