Thread: Reset button
View Single Post
  #3  
Old 02-04-2012, 02:33 PM
BaraoZemo BaraoZemo is offline
Senior Member
 
Join Date: Nov 2001
Posts: 3,598
Default

in the "on create" of your form, read the state of all components: buttons, label, edits, grids,etc... and store it (in a temp file or memory variable),
when you want to reset it... just restore it back using the load function from the "save form component" ....

(some components for this save/load components state)
- rxlib (component Tformstorage)
- NiceSettings http://www.priyatna.org/nicesettings.php
- Toptions http://www.webdelphi.ru/wp-content/u...ns-v.1.7.1.zip

Quote:
Originally Posted by Fireprufe15 View Post
Is there some function I could use on my reset button or New Game button to reset the program to the state it was on creation, so that I don't need to manually clear all output text, variables, arrays etc.
There is a whole lot of variables to clear and I would prefer to do it all in one go. Thank you.
Reply With Quote