Topic: adding rows and column on a form
i have 5 rows of changing numbers and 5 columns of changing numbers, i use the script onchange to add the row and it works fine. the problem arises when trying to add the columns. i get erros sainf the on change has already been defined the scrips is somethinglike this:
procedure CalculateTotal1;
begin
Score.edit1.Value := Score.edit1.Value + Score.edit1.Value + Score.edit1.Value ;
end;
procedure Score_edit1_OnChange (Sender: string);
begin
CalculateTotal1;
end;
procedure Score_edit2_OnChange (Sender: string);
begin
CalculateTotal2;
end;
procedure Score_edit3_OnChange (Sender: string);
begin
CalculateTotal3;
end;
//the same for the rest of the rows
procedure CalculateColTotal1;
begin
Score.edit13.Value := Score.edit1.Value + Score.edit5.Value + Score.edit9.Value;
end;
procedure Score_edit1_OnChange (Sender: string);
begin
CalculateColTotal1;
end;
procedure Score_edit5_OnChange (Sender: string);
begin
CalculateColTotal1;
end;
procedure Score_edit9_OnChange (Sender: string);
begin
CalculateColTotal1;
end;
//the same for the rest or the columns
begin
end.
the first error would be edit one is redifined