Voorarm
Competitive Bodybuilder
- Lid sinds
- 16 okt 2007
- Berichten
- 2.728
- Waardering
- 116
- Lengte
- 1m50
vx mny fcrpvnny ibbe wbh zvwa cbfg jry rira nnacnffra. :c
(ora wvw gebhjraf bbx yvq ina unpxre.bet? Fgnna rpug yrhxr punyyratrf bc!)
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
ListBox1: TListBox;
edtEntry: TEdit;
Button1: TButton;
Button2: TButton;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
lblTotal: TLabel;
GroupBox3: TGroupBox;
lblSelectedIndex: TLabel;
GroupBox4: TGroupBox;
lblSelectedText: TLabel;
Label1: TLabel;
Edit2: TEdit;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
private
//--------------------------------------------------------
//Custom procudures
procedure UpdateStats;
//--------------------------------------------------------
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure Tform1.UpdateStats;
begin
lblTotal.Caption:=IntToStr(Listbox1.Items.Count);
lblSelectedIndex.Caption:=IntToStr(Listbox1.ItemIndex);
if Listbox1.ItemIndex>-1 then begin
lblSelectedText.Caption:=Listbox1.Items.Strings[Listbox1.ItemIndex];
end else begin
lblSelectedText.Caption:='';
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if edtEntry.Text<>'' then begin
Listbox1.Items.Add(edtEntry.Text);
edtEntry.Text:='';
UpdateStats;
end
else
Showmessage('No text typed');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if Listbox1.ItemIndex>-1 then begin
ListBox1.Items.Delete(Listbox1.ItemIndex);
UpdateStats;
end
else
Showmessage('Nothing is selected')
end;
procedure TForm1.ListBox1Click(Sender: TObject);
begin
Updatestats;
end;
end.
Jij weet tenminste waar je over praat CoD.

)