Alessandro wrote:
In this case, I want work in the same window.
How can I destroy the 2 buttons ?
Most general: How can destroy any controls so I can reuse the same window to put in it other controls ??

Short answer: you don't. At least I don't think that's the best option, although it may be possible. What you can do is this:

Hide the controls you don't want and simply create new ones to replace them. This will involve losing the memory until the program ends, but if we're not talking about long-running processes here (and my guess is that we're not), that should remain a theoretical problem (were it not for the fact that memory leaks hurt our perfectionist egos :).

It is possible to create event handler subs on the fly (with eval string) if that should be needed. But maybe you already know exactly which controls to create? In that case, I suggest that you create them from the beginning and just keep them hidden until they are needed.


/J

------ ---- --- -- -- -- -  -   -    -        -
Johan Lindström                    Boss Casinos
Sourcerer                     [EMAIL PROTECTED]
                 http://www.bahnhof.se/~johanl/
If the only tool you have is a hammer,
everything tends to look
like a nail


Reply via email to