Problem using form inheritance with FNCPageControl

When using inherited forms, when the master form has a FNCPageControl, with designtime predefined pages, it generates new PageControlConteiners in inherited forms, causing compiler and/or IDE show several errors, and sometimes making IDE raise runtime errors and crashes.

Ex.:

This is the parent form structure, with a pagecontrol, two pages and some other controls inside os those pages.

image

When I create a new form via File / New / Other / Inheritable Items / formMain , I get a inherited form with both pgPage1 & pgPage2 I defined on parent structure, and it creates a new control container for each page, that causes several errors:

image

I try to fix the DFM manually, but it's useless. Most times throws errors like:
image

In 2020 I had the same issue with some VCL Adv controls that had the same structure of sub-members (like in the Pages collection where items are TMSFNCPageControlsPage) defined apart of the corresponding Control Containers (like TTMSFNCPageControlContainer), but in that case, editting the inherited forms DFMs worked as a fix for some of them.

With FNCPageControl , when there are design-time pages, I can't use form inheritance neither in VCL nor in Web Core. Couldn't find a fix yet - only if I create pages and it's child controls at runtime.

Every time the DFM is generated or accessed, it seems to force that those auto-named pagecontainers are present.

Still with many problems on trying to use design-time FNC container-like controls and inheritance. Basically the only way I could make it work is without inheritance at all, by creating everything by code.

Could you please confirm or maybe post another workaround for this?
Is it right to assert that many FNC Components are not form-inheritance-compliant or form-inheritance-ready?

Hi,

We do not focus on making controls support form inheritance. Also, the TTMSFNCPageControl is a one-of-a-kind control with a complex structure. When time permits, we'll investigate the possibilities, but right now, there is no workaround to support TTMSFNCPageControl in inherited forms unfortunately.

:no_mouth:

It does supports inheritance: by code.
The issue raises when you're doing it via IDE form designer. Doesn't sound as a structure issue, but fixing/adding the right csDesigning / IsDesignTime checks. In it's version history, 5 out of it's 7 documented fixes were design-time issues. Maybe it's just one more.

Thank you for your feedback.
As soon as time permits, we'll investigate this here.