Hi Curtis, > I am developing a program that dynamically creates and removes > panels from a groupbox on the fly depend on if the control variable > changes, the screen is updated each second. > My problem is 1, how do you destroy and free the panels before creating the > new one.
You need a references to each panel (a variable of type TPanel). You can use an array or an TObjectList to do so. Then set Parent of a specific panel to nil and destroy it with method release (it is not recommended to use free for controls which are reacting on windows events. See online help for further information). > And 2, how do you stop the screen from flickering each time the form is > updated. If the number of panels does not change every second (but only label caption), you can check the number of panels before throwing them away and create new ones. If you dont do already. Is it possible just to change property visible of panels (If you have a max number of panels)? It sounds like you are writing a programm which monitors some values or so. Did you consider not to use panels but draw your information directly in a paintbox? Maybe you should have a look at methods of TCanvas class. You also should search the web for 'flicker free drawing' or 'double buffering'. HTH :-) -- Cheers, J�rn ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

