unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, Grids, StdCtrls, ComCtrls, Menus;
type
TForm1 =
class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Name: TLabeledEdit;
Alter: TLabeledEdit;
Wohnort: TLabeledEdit;
Tel: TLabeledEdit;
HinzuBtn: TButton;
LoeschenBtn: TButton;
AdresseGrid: TStringGrid;
BeendenBtn: TButton;
MonthCalendar1: TMonthCalendar;
Panel3: TPanel;
MainMenu1: TMainMenu;
Datei1: TMenuItem;
Speichern1: TMenuItem;
Speichernunter1: TMenuItem;
Nochnichtfertig1: TMenuItem;
procedure BeendenBtnClick(Sender: TObject);
procedure HinzuBtnClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Name, Wohnort:
string;
Alter, Tel: integer;
implementation
{$R *.dfm}
procedure TForm1.BeendenBtnClick(Sender: TObject);
begin
//sleep(1000);
close;
end;
procedure TForm1.HinzuBtnClick(Sender: TObject);
begin
AdresseGrid.Cells[1,1]:=
Name.Text;
AdresseGrid.Cells[2,1]:= Alter.Text;
AdresseGrid.Cells[3,1]:= Wohnort.Text;
AdresseGrid.Cells[4,1]:= Tel.text;
end;
procedure TForm1.FormCreate(Sender: TObject);
var i : integer;
begin
AdresseGrid.Cells[1,0]:= '
Name';
AdresseGrid.Cells[2,0]:= '
Alter';
AdresseGrid.Cells[3,0]:= '
Wohnort';
AdresseGrid.Cells[4,0]:= '
Telefon';
for i := 1
to 20
do
begin
AdresseGrid.Cells[0,i]:= IntToStr(i);
end;
end;
end.