4

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?

Cobus Kruger
  • 8,338
  • 3
  • 61
  • 106
  • 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
  • 2
    Of 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

0 Answers0