a. Frame class registration
No need to do it in a "hacker way"
uses ... DMForm, VCLFormContainer, ... procedure Register; begin ... RegisterCustomModule(TYourFrameClass, TFrameModule); // for frames RegisterCustomModule(TYourModuleClass, TDataModuleCustomModule); // for data modules ... end;
There is another way to add frames.
type TNestableWinControlCustomModule = class (TWinControlCustomModule) public function Nestable: Boolean; override; end; function TNestableWinControlCustomModule.Nestable: Boolean; begin Result := True; end;
+
RegisterCustomModule(TYourFrameClass, TNestableWinControlCustomModule);
Unit names (verified in XE7):
TCustomModule => DesignEditors
TDataModuleCustomModule => DMForm (designide.dcp)
TWinControlCustomModule => WCtlForm (designide.dcp)
TFrameModule => VCLFormContainer (vcldesigner.dcp)
I believe that for FireMonkey this should be possible in a similar way (find fmxdesigner.dcp and check what's inside in Notepad ++)
B. To use it in the "New ..." wizard , you need to register the wizard class. If you donβt have time to write a wizard class, simply create a new frame, and then manually replace the parent class name and add the corresponding block to the "uses" list. What all
PS. . In older versions of Delphi, instead of TDataModuleCustomModule in the DMDesigner module
was a metaclass TDataModuleDesignerCustomModule,
PPS Other existing metaclass names:
TCustomFormCustomModule
TIDESourceModuleCustomModule