I'm writing a Delphi app, in which I have a procedure to clear the form and reset it to its default state.
procedure ResetForm ();
begin
edtG1.Text := ''; // Error occurs on this line, no matter what the instruction is.
edtG1.Enabled := True;
btnG1Check.Enabled := True;
.
.
.
.
end;
I've tried everything - that first line of code in the procedure doesn't compile, no matter what. I can't see any problem with the declaration of the procedure either.
Can someone please assist? My thanks.
I am trying to clear all the fields in the form, enable what has been disabled, etc. To reset it to its default state as it starts at the beginning of the program. I tried different code instructions on that first line (yes, edtG1 exists), other controls do exactly the same and all other instructions. I have tried renaming the procedure too, but to no avail.
Exit;
then it would not yield a syntax/compiler error.