Here is a quick comparison of Delphi components and frames and at the end is my question.
Advantages of Delphi components:
- They are encapsulated well. A software that uses components can access only
publicandpublishedproperties of components. - All their inner event handlers are available at parent form's design time.
Disadvantages of Delphi components:
- They need to be installed with some package
- The package is shared between multiple applications even if the components inside are application-specific
Advantages of Delphi frames:
- They could be placed on a form just like components
- Their
publishedproperties also can be adjusted in a form - They are in-app only and aren't available for the rest of apps which they don't belong to
- They are quickly available. No need to install.
Disadvantages of Delphi frames:
- All of their inner components are directly available in a parent form. If I move the components from
publishedsection, design-time customizations are broken in the frame designer too. - If I override the
Resizemethod in a frame all the arrangements are available at run-time only. No arrangements at design-time are made. - If I introduce a new
publishedproperty, it is not available in object inspector.
What I would like to have is a symbiotic thing:
- Good encapsulation. None of the inner components is available from the parent form, but all their inner components are fully functional either at run-time or at their design-time.
- Quick availability. No need to install.
- In-app only. No sharing with other apps.
- Their published properties can be adjusted in a form
- All the method overrides (especially Resize method) are available at design-time.
Could you suggest a thing that fulfills these requirements? Or may be some surprising method to work with frames I didn't know about?
It shouldn't be necessarily a frame or a component. If some of other VCL classes fulfills these requirements, I would gratefully accept it.