unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 =
class(TForm)
ListBox1: TListBox;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Edit1: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
Original:
array [0..9]
of string;
zaehler: integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
If zaehler < 10
then
begin
ListBox1.Items[zaehler]:= Edit1.Text;
zaehler := zaehler+1;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
var counter: integer;
speicher:
string ;
i: integer;
begin
Speicher:= Listbox1.Items[0];
For i:= 0
to 8
do
ListBox1.Items[i]:=ListBox1.Items[i+1];
ListBox1.Items[9]:=speicher;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
zaehler:= 0;
end;
procedure TForm1.Edit1Change(Sender: TObject);
var counter :integer;
begin
Button2.Visible:= false;
Button3.Visible:=false;
Button4.Visible:=false;
Edit1.SetFocus;
If Edit1.Text = '
'
then
begin
Edit1.Visible:= false;
Button1.Visible:=false;
Button2.Visible:= true;
Button3.Visible:=true;
Button4.Visible:=true;
end;
end;
procedure TForm1.Button3Click(Sender: TObject);
var counter: integer;
speicher:
string ;
i: integer;
begin
???
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
???
end;
end.