Jason Cipriani
2008-07-11 07:24:31 UTC
Where is the best place to initialize GUI components (and other application
stuff) if you have to do it *after* all VCL components (including all forms)
have been loaded? Is there an event, or some good place to do this?
For example (this is contrived, but it illustrates the point): Say I have
two forms, Form1 and Form2, and each form has a TLabel on it. Also say each
form has a TLabel * member variable that should be set to the TLabel on the
other form. How can I do this (while doing it immediately before showing one
of the forms works for this particular example, that's *not* the solution
I'm looking for).
I find that I am frequently using one-shot TTimers to initialize this kind
of stuff (initially disabled, enabling in main form create, with a short
interval). It really seems pretty sloppy. There has to be a better way.
Thanks,
Jason
stuff) if you have to do it *after* all VCL components (including all forms)
have been loaded? Is there an event, or some good place to do this?
For example (this is contrived, but it illustrates the point): Say I have
two forms, Form1 and Form2, and each form has a TLabel on it. Also say each
form has a TLabel * member variable that should be set to the TLabel on the
other form. How can I do this (while doing it immediately before showing one
of the forms works for this particular example, that's *not* the solution
I'm looking for).
I find that I am frequently using one-shot TTimers to initialize this kind
of stuff (initially disabled, enabling in main form create, with a short
interval). It really seems pretty sloppy. There has to be a better way.
Thanks,
Jason