I am looking for a way to use one procedure for multiple buttons. It's for a quiz like you have to press Button 1 for question 1, but copy and pasting the whole code for 36 buttons and changing the variables for 36 buttons isn't really fun for anybody.
So I thought something like this would be possible:
procedure TForm1.Button[x]Click(Sender: TObject);
begin
DoTask[x];
end;
X being the variable.
Is something like that possible or are there other ways to acquire the same result?