1

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

Fabrizio
  • 7,603
  • 6
  • 44
  • 104
AnselmoMS
  • 467
  • 3
  • 18

1 Answers1

0

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.

Dsm
  • 5,870
  • 20
  • 24
  • Maybe I mispronounced. The goal is similar to "TAbout". I want it to be possible to create another inherited form from this menu [File> New> ...] just like the native one. In my package, it is a DFM and PAS form that contains subcomponents. so how to reproduce this? – AnselmoMS Apr 04 '18 at 15:11
  • Sorry, to be clear, you want to add a form that you have created with the wizard to the repository? – Dsm Apr 04 '18 at 15:42
  • I created a form with new properties and subcomponents in a package. Then I created a wizard for it in the same package. Now I want to be able to create a form inherited from this form from the repository, similar to creating a "TAboutBox" from File> New> Delphi Files> **[Chose Inherit]**> "About Box". I think the wizard has nothing to do with it, right? but I want it to be automatically added to the repository, just as TAboutBox is already available from the factory. – AnselmoMS Apr 04 '18 at 17:34