Einzelnen Beitrag anzeigen

Tobicaster

Registriert seit: 12. Nov 2007
29 Beiträge
 
#1

procedures zusammenfassen/vereinfachen (Totale Anfängerfrae)

  Alt 12. Nov 2007, 00:52
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!
  Mit Zitat antworten Zitat