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/
