TFrame as component, IDE changes the object to inline on first use

I've created a Tframe block with visual and DB controls. I registered the frame as a component using the sprig approach. TFrame has several posted boolean properties.

Everything works fine, except that I noticed that if I start the IDE and open a project that uses that component, the IDE complains about "unknown" published properties. And if you look at DFM, Delphi changed the definition for a frame in the form in which it is embedded, from "object ..." to "inline ...". If I just close the project without saving or opening it, everything is fine.

This only happens when you open the first project.

Any suggestions would be appreciated.

+1


source to share


1 answer


The point here is that TFrame registration does work, but property posting is almost always not. I say "almost always" because I have had this kind of problem in the past (Delphi XE2 as far as I can remember) and there seems to be a bug in the designer deeply hidden somewhere. Debugging this issue gave me no results.



I suggest you just move the published properties to public and set those properties directly in your source code. This is a workaround, but it works.

+1


source







All Articles