I have a panel containing 5 buttons and it would be nice if I could destroy the panel and all of the views contained within so that a sub I already have can initialise it again.
One option I guess would be to initialise the panel every-time I want to display it but I considered this a waste as normally it is already set exactly the way I want and so I just show or hide it using the visible property. I now have a need to change the layout of the panel and the simplest way would be to just destroy it and let my already written sub take care of it.
My work-around at the moment is to use a global variable to flag when to re-initialise the panel, it would be nicer and easier to follow my code if I could destroy the view and all views contained within. Is this possible?
Kind regards,
RandomCoder
One option I guess would be to initialise the panel every-time I want to display it but I considered this a waste as normally it is already set exactly the way I want and so I just show or hide it using the visible property. I now have a need to change the layout of the panel and the simplest way would be to just destroy it and let my already written sub take care of it.
My work-around at the moment is to use a global variable to flag when to re-initialise the panel, it would be nicer and easier to follow my code if I could destroy the view and all views contained within. Is this possible?
Kind regards,
RandomCoder