Of course the simple answer is to use a "nil" owner - then the name is never checked and does not matter. Of course you then have to free the frame yourself. There has also been some patches involving the streaming of frames ... But from memory was not related to this kind of issue.
M -----Original Message----- From: Kurt at DBC [mailto:[EMAIL PROTECTED] Sent: Friday, 3 October 2003 14:47 To: Multiple recipients of list delphi Subject: Re: [DUG]: Frames Myles Penlington wrote: > I do this kind of this all the time and have never had a problem. Mind you I > added my own constructor to the frames to stop an issue with window handles > - ActiveX related. > >> I have an Application in which I create and delete TabPages dynamically - >> the Tab Pages contain a Frame which I create at Run Time. >> To do this the Name of the Frame must be set to ''. >> I can set the name to '' at design time (Object Inspector) - but I cannot >> save it ... each time I re-open the Frame the Name is set to the class name. >> How can I fix this "bug" !!! >> >> >> Regards >> Paul McKenzie The way I usually do it is : var f : TFrame3; begin f := TFrame3.Create(self); f.Name := 'Frame3' + FormatDateTime('hhnnsszzz', now); f.Parent := t; which gives every frame a distinct name (assuming single threaded). Its always struck me as wrongish, but it works - I haven't ever had the chance to use it in production, so haven't ever looked for a better way. Cheers, Kurt. --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
