Jump to content

create frames


Recommended Posts

If "cloning" the visual components is sufficient you can try serializing/deserializing the frame. If you need to preserve the data (and non-visual components, i.e. datasets) you need to to it by hand, and it may be very hard.

For serializing the components see




Beware, this process is possible only in Delphi. I tried in C++ and never succeeded.

Link to comment
Share on other sites



Is not exactly what I'm looking for.


Now, for every form I have 4 files:


- 2 files for the form (.pas, and .dfm)

- 2 files for the frame where I am going to load the form. other .pas and.dfm for the frame


I'd like to have only one frame crated, and create frames in run time, as a copy of that frame, but I dont know how to do it.


Now, I'm doing as I explain above, the files of the frame are very little, but I think it could be more clear having only the files for the form and create the frame in run-time.


somme help and / or idea, will be wellcome.



Link to comment
Share on other sites

  • 1 year later...

Hi all.


I have this:


   xfrc: Tfpframe;


And this piece of code only works the 1st. time that is excuted:


      xfrc := Tfpframe.Create(self);
      xfrc.Align := alClient;
      xfrc.Parent := Ts;


The 2nd. time, raises the error: A Component names fpframe already exists.


Any Idea?



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...