Hallo!
Ich bin absoluter Neuling in Delphi und hab shcon gleich ne Frage, die mir fast schon peinlich ist^^
Delphi-Quellcode:
procedure TForm1.B0Click(Sender: TObject);
begin
Display.Caption := Display.Caption + (sender as TButton).Caption;
end;
procedure TForm1.B1Click(Sender: TObject);
begin
Display.Caption := Display.Caption + (sender as TButton).Caption;
end;
procedure TForm1.B2Click(Sender: TObject);
begin
Display.Caption := Display.Caption + (sender as TButton).Caption;
end;
procedure TForm1.B3Click(Sender: TObject);
begin
Display.Caption := Display.Caption + (sender as TButton).Caption;
end;
procedure TForm1.B4Click(Sender: TObject);
begin
Display.Caption := Display.Caption + (sender as TButton).Caption;
end;
procedure TForm1.B5Click(Sender: TObject);
begin
Display.Caption := Display.Caption + (sender as TButton).Caption;
end;
procedure TForm1.B6Click(Sender: TObject);
begin
Display.Caption := Display.Caption + (sender as TButton).Caption;
end;
procedure TForm1.B7Click(Sender: TObject);
begin
Display.Caption := Display.Caption + (sender as TButton).Caption;
end;
procedure TForm1.B8Click(Sender: TObject);
begin
Display.Caption := Display.Caption + (sender as TButton).Caption;
end;
procedure TForm1.B9Click(Sender: TObject);
begin
Display.Caption := Display.Caption + (sender as TButton).Caption;
end;
Wie kann ich obiges einfach und unkompliziert zusammenfassen? Danke schonmal!