hallo leute mittlerweile hab ich das programm soweit das ich die panels und über dem panel jeweils 2 button habe um die kästchen auszufüllen
ich kann auch schon auf ein button klicken und es wird das panel ausgefüllt nur weiß ich leider nicht weiter
ich bitte um hilfe
interface
type
TForm1 = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
Panel5: TPanel;
Panel6: TPanel;
Panel7: TPanel;
Panel8: TPanel;
Panel9: TPanel;
Panel10: TPanel;
Panel11: TPanel;
Panel12: TPanel;
Panel13: TPanel;
Panel14: TPanel;
Panel15: TPanel;
Panel16: TPanel;
Panel17: TPanel;
Panel18: TPanel;
Panel19: TPanel;
Panel20: TPanel;
Panel21: TPanel;
Panel22: TPanel;
Panel23: TPanel;
Panel24: TPanel;
Panel25: TPanel;
Panel26: TPanel;
Panel27: TPanel;
Panel28: TPanel;
Panel29: TPanel;
Panel30: TPanel;
Panel31: TPanel;
Panel32: TPanel;
Panel33: TPanel;
Panel34: TPanel;
Panel35: TPanel;
Panel36: TPanel;
Panel37: TPanel;
Panel38: TPanel;
Panel39: TPanel;
Panel40: TPanel;
Panel41: TPanel;
Panel42: TPanel;
Panel43: TPanel;
Panel44: TPanel;
Panel45: TPanel;
Panel46: TPanel;
Panel47: TPanel;
Panel48: TPanel;
Panel49: TPanel;
Panel50: TPanel;
Panel51: TPanel;
Panel52: TPanel;
Panel53: TPanel;
Panel54: TPanel;
Panel55: TPanel;
Panel56: TPanel;
Panel57: TPanel;
Panel58: TPanel;
Panel59: TPanel;
Panel60: TPanel;
Panel61: TPanel;
Panel62: TPanel;
Panel63: TPanel;
Panel64: TPanel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Button8: TButton;
Button9: TButton;
Button10: TButton;
Button11: TButton;
Button12: TButton;
Button13: TButton;
Button14: TButton;
Button15: TButton;
Button16: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
a1,a2,a3,a4,a5,a6,a7,a8:integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Button1.Visible:=False;
Button2.Visible:=True;
Button3.Visible:=False;
Button4.Visible:=True;
Button5.Visible:=False;
Button6.Visible:=True;
Button7.Visible:=False;
Button8.Visible:=True;
Button9.Visible:=False;
Button10.Visible:=True;
Button11.Visible:=False;
Button12.Visible:=True;
Button13.Visible:=False;
Button14.Visible:=True;
Button15.Visible:=False;
Button16.Visible:=True;
begin
if a8=0 then a8:=1 else
if a7=0 then a7:=1 else
if a6=0 then a6:=1 else
if a5=0 then a5:=1 else
if a4=0 then a4:=1 else
if a3=0 then a3:=1 else
if a2=0 then a2:=1 else
if a1=0 then a1:=1
end;
begin
if a8=1 then Panel8.Color:=clgreen;
if a7=1 then Panel7.Color:=clgreen;
if a6=1 then Panel6.Color:=clgreen;
if a5=1 then Panel5.Color:=clgreen;
if a4=1 then Panel4.Color:=clgreen;
if a3=1 then Panel3.Color:=clgreen;
if a2=1 then Panel2.Color:=clgreen;
if a1=1 then Panel1.Color:=clgreen;
end;
end;
end.