Insert a Form inside a a TmsFMXPagecontrol

Hi, I'm trying to put a Form inside a Tab in my TmsFmxPagecontrol, in a Firemonkey Application.
the tab item is created but the form always shows in a new Window and not inside the tab item.

I try this approach:

page : TTMSFMXPageControlPage;
Container : TTMSFMXPageControlContainer;
VForm : Tform ;


Page := Maintab.Pages.Add;
Container := Page.Container;

//New Form
vForm := TForm.Create(Container);
vForm.Parent := Container;

Page.Text:= vForm.Caption;

// Active Page in PageControl
MainTab.ActivePageIndex := MainTab.Pages.Count - 1;

Is there a way to solve this problem or a better way to achieve what I need?

Best Regards

Anyone Please... :frowning:

Hi, sorry for the delayed response, I have been out of office. It's unclear if this is actually related to the TTMSFMXPageControl. Can you try this on a default page control? If the problem persists, try using the Visible property instead of the Show. or change the border style of the form. Alternatively, you can wrap all controls in a Panel, and simply transfer the panel to the container.

Thanks Pieter I will try it

Pieter it works using the wrap method of a panel or layout.

Thanks for pointing me to the solution.



1 Like