Hallo =) ich brauche noch hilfe beim laden und speichern von records in dateien =)
schreibe morgen eine arbeit und bekomme das noch nicht so wirklich hin. hier mein bisheriger quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68:
| implementation
{$R *.dfm}
const pmax = 10; Type TPerson = record nname, vname: string[20]; end;
var personen: array[1..pmax] of TPerson; index: integer = 1; procedure TForm1.Button1Click(Sender: TObject); begin personen[index].nname := edit1.Text; Personen[index].vname := edit2.Text; end;
procedure TForm1.Button2Click(Sender: TObject); begin edit1.Text := personen[index].nname; edit2.Text := personen[index].vname; end;
procedure TForm1.FormCreate(Sender: TObject); var i: Integer; begin for i := pmax downto 1 do with personen[i] do begin nname := ''; vname:=''; label1.caption:=IntToStr(index); end end;
procedure TForm1.Button3Click(Sender: TObject); begin if index > 1 then begin Button1.Click; Dec(index); Button2.Click; label1.caption:=IntToStr(index); end end;
procedure TForm1.Button4Click(Sender: TObject); begin if index < pmax then begin Button1.Click; Inc(index); Button2.Click; label1.caption:=IntToStr(index); end end;
end. |
Falls das alles bisschen komisch sein sollt, ich bin noch ein anfänger =)
danke für eure hilfe