I'm very new to Delphi and I'm stuck with this (hopefully very basic) question.
How do you reset a form when it's closed?
I have 2 forms, say "form1" and "form2", when you click a button on form1 it opens form2 via form2.ShowModal; on form2 you input data, save it and then closes the form bringing them back to form1.
Only problem is, when you click the button to open form2 again the data entered last time is still there. If form2 only had a couple of components that would be fine, I'd reset them manually on close... but it doesn't, it has loads of checkboxes, input boxes, combo boxes, list boxes, etc. So it isn't really practical to even loop through the componentlist and reset values.
Is there a function to do this for you? If not could somebody suggest the best solution?
Thanks in advance!