How do I inherit from a frame or use it as a component

Forms can be inherited in Add New → Other → Inheritable Items.

I was expecting frames to be here, but they are not.

Also the trick that works in VCl (by changing the class from TForm to yours in the .PAS file and changing object to inherited in dfm/fmx) does not work in FMX.

I am trying to setup a framework so all my mobile apps have the same basic bones.

I have successfully created FMX frames that are inheritable in 10.4, and show up under Inheritable Items.

IIRC, I have used the trick of changing class from TFrame to the base frame and changing object to inherited did work in FMX.

Do you have your base frame created and in the application where you want the child frame to be?

I had another look, the list was showing “Frame1” but not the one I had named it to. When I selected this, it was giving incomprehensible errors. Everything was compiling at this stage.

So I restarted the IDE. This time it gave errors on this unit saying that the fmx had incorrect width. I looked at it. What was wrong was that the Object Inspector had changed the name in the .pas file but not in the .fmx file. After I manually corrected it, it all works. Even after restarting.

I think if I have one more issue, I am going back to 10.4