Search code examples
delphifiremonkeydelphi-10-seattle

how to place form in layout in firemonkey android


I Am trying to place a form inside a tlayout in firemonkey android platform but when i try to create a parent form in firemonkey its shows as full screen ?

as example i do something like this

Form2 := Tform2.create(nil);
form2.parent := layout1
form2.visible := True;

but the form shows as fullscreen not inside the Tlayout i try to do form2.fullscreen := False; but nothing changes the form shows in full screen . how to place a form into a layout in firemonkey android platform ?


Solution

  • I don't think it's possible do that in FireMonkey like VCL. You can do a workaround, create a Layout inside of your form2, set the align to Client, put all controls there instead of put directly in the form.

    Form2 := Tform2.create(nil);
    Form2.mainLayout.parent := layout1;