Einzelnen Beitrag anzeigen

Benutzerbild von Jarie
Jarie

Registriert seit: 28. Feb 2006
Ort: Deutschland
17 Beiträge
 
Delphi 7 Professional
 
#27

Re: if...then...else

  Alt 22. Mai 2006, 17:34
Delphi-Quellcode:
begin
  if (Form1.Label5.Caption='') and
    procedure TForm1.Button1Click(Sender: TObject);
begin
  Label1.Caption:= Label1.Caption + '1';
end;
or
procedure TForm1.Button2Click(Sender: TObject);
  begin
    Label1.Caption:= Label1.Caption + '2';
end;
or
procedure TForm1.Button3Click(Sender: TObject);
  begin
    Label1.Caption:= Label1.Caption + '3';
end;
or
procedure TForm1.Button4Click(Sender: TObject);
  begin
    Label1.Caption:= Label1.Caption + '4';
end;
or
procedure TForm1.Button5Click(Sender: TObject);
  begin
    Label1.Caption:= Label1.Caption + '5';
end;
or
procedure TForm1.Button6Click(Sender: TObject);
  begin
    Label1.Caption:= Label1.Caption + '6';
end;
or
procedure TForm1.Button7Click(Sender: TObject);
  begin
    Label1.Caption:= Label1.Caption + '7';
end;
or
procedure TForm1.Button8Click(Sender: TObject);
  begin
    Label1.Caption:= Label1.Caption + '8';
end;
or
procedure TForm1.Button9Click(Sender: TObject);
  begin
    Label1.Caption:= Label1.Caption + '9';
end;
or
procedure TForm1.Button10Click(Sender: TObject);
  begin
    Label1.Caption:= Label1.Caption + '0';
end; then
  begin
    Form1.Label5.Caption:=Form1.Label1.Caption;
end
else
  Form1.Label6.Caption:=Form1.Label1.Caption;
end;
end
Der rote Balken ist ganz oben in der Zeile mit Procedure, also dritte Zweile (glaub).
Ich hab jetzt mal alles so hingeschrieben wie ich's haben will, geht natürlich nit ^^.
  Mit Zitat antworten Zitat