Best way to save contents of a TPanel created at runtime...?

Quote
D. Zimmer wrote:

> I was wondering if anyone has a solution for saving the contents of a
> TPanel created at runtime. There will be a few TEdit controls that the
> user decides to include and I'd like to save them (size & pos) and
> have them restored the next time the panel is displayed.

Try saving/loading the panel on a file-stream.

To write the panel:

  With TFileStream.Create(FileName, fmCreate) do
    Try
      WriteComponent(Panel);
    Finally
      Free;
    End;

and to read it back:

  With TFileStream.Create(FileName, fmOpenRead) do
    Try
      Panel:= ReadComponent(Nil);
    Finally
      Free;
    End;

This might work, but if not you'll have to get more involved in the
streaming process.

Andrew Stewart