Jump to content
David Schwartz

Copy a form in a project?

Recommended Posts

I'm taking an approach where I'm building something piece by piece where I do some work with a form until I get where I want to be, then I want to clone it and modify it for the next step. So each step is a separate form.


This is simply for development purposes, and I don't want separate projects.


I'm curious if there's an easy way to "smart copy" a form? Right now it seems you have to "Save As..." a new form name, then rename the form and its class, then add the previous form back into the project.


Are there any wizards that might add a "Copy form..." or "Clone form..." option to the Project Manager's right-click on a form name?

Share this post

Link to post
Posted (edited)

After saving as new form name


Go in Object inspector and change the name of the form.  the form new name is applied in the implementation as well.


Or simply show controls in sequence setting visibility as needed.

Edited by Pat Foley
add visibility

Share this post

Link to post
Posted (edited)

hi @David Schwartz


the best way for that task without use any other external tools on RAD Studio IDE is:

  • ADD on Repository by IDE menu

image.thumb.png.d08dd6f0795ff46139f1651425ad84e1.png   image.thumb.png.c73bb6a0048d076ca2e99c6f97d63573.png


  • Yours objects, in case, the forms, should be saved in your folder desired.
    • just customize it as you want and save to have it in your repository
  • by default, the XML (repository.xml) file with the descriptions and definitions for find your objects is save in 
    • C:\Users\<<WIN-USER-FOLDER>>\AppData\Roaming\Embarcadero\BDS\<<IDE_NUMBER>>
  • now, you can use it in any project.
    • File -> New -> Others ... .find you Category and your objects on repository
    • for more easy access, use "Customize..." and add the reference to menu "File -> New ---> your-forms-here"
  • then, the IDE will go rename it for a name not conflicting with others forms.
  • Simple and easy.


		</Item>  <Item IDString="D:\RADRIOTests\_Temporarios\MyFormToCOPYes" CreatorIDString="BorlandDelphiRepositoryCreator">
      <Name Value="MyFormXXXtoCOPY"/>
      <Icon Value=""/>
      <Description Value="my form to produce COPYes"/>
      <Author Value="MySelf"/>
      <Personality Value="Delphi.Personality"/>
      <Platforms Value=""/>
      <Frameworks Value="VCL"/>
      <Identities Value="RADSTUDIO"/>
        <Category Value="InternalRepositoryCategory.MyFormsToCOPY" Parent="Borland.Delphi.New">MyFormsToCOPY</Category>
        <Category Value="Borland.Delphi.New" Parent="Borland.Root">Delphi</Category>
      <Type Value="FormTemplate"/>
      <Ancestor Value=""/>
      <FormName Value=""/>
      <Designer Value="Any"/>



Edited by Guest

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now