How create a inheritable custom form from package by Object Repository on Delphi?

681 Views Asked by At

I've created a wizard for creating a custom form. It's working normal. I can create it from the File> Other> 'MyWizards' menu. But, I would like to add the common options of forms and dialogs: "Use", "Inherit" and "Copy". How to do this? Is there any interface method that needs to be implemented to set that it is inheritable? Below is a snippet of my assistant's code.

type
  TMyFormWizard = class(TNotifierObject, IOTAWizard, IOTAProjectWizard, IOTARepositoryWizard, IUnknown, IOTARepositoryWizard80)

...

  TUnitCreator = class (TNotifierObject, IOTACreator, IOTAModuleCreator)

...

  TBaseFile = class(TInterfacedObject)

...

  TUnitFile = class(TBaseFile, IOTAFile)

...

  TFormFile = class(TBaseFile, IOTAFile)

Below is a picture of an example of how I would like my wizard to stay. Similar to native Delphi objects (like a AboutBox)

dialog of Delphi Files

1

There are 1 best solutions below

3
On

If a wizard were inheritable, what the inherited object would be is another wizard. I don't think that is what you are trying to achieve. Of course any form you create by the wizard is itself inheritable, but you would have to add it to the repository to do that. You can't inherit from it until you have created it. TAbout, which you refer to, is a form, not a wizard.

Edit

To add a form you have created to the repository, open the form in the IDE, roght click on it (e.g. in the title bar), select 'Add to Repositoty...'. Fill in the details. The form will be inheritable.

Note this is nothing to do with whether it was created by the wizard or not.