A VCL form has an AutoSize property to automatically adjust the form's size to its contents. I don't see a similar mechanism for Firemonkey. Short from manually calculating the size and setting Height and Width, is there a way?
Asked
Active
Viewed 1,215 times
4
-
Try http://stackoverflow.com/questions/11875691/fluid-dynamic-layout-in-firemonkey-delphi – Paul Heinrich Aug 23 '13 at 08:26
-
That question is about dynamically sizing the components on the form. I want to dynamically size the form. – Cobus Kruger Aug 23 '13 at 08:38
-
Yes, You should calculate Width = Max(ControlRects.Right) and Height = Max(ControlRects.Bottom). – mh taqia Aug 23 '13 at 14:38
-
2Of course I can calculate the width and height. The question was if there is a way to do it automatically, as in VCL forms. Since the VCL form has this built in, I don't need to have code to update the form's size whenever a control inside it is changed. – Cobus Kruger Aug 26 '13 at 09:36