30 Ocak 2014 Perşembe

Seçilen Eleman Üzerinde İşlemler


Seçilen elemanı silen,eleman sırasını,toplam eleman sayısını bulan programın kodu.

procedure TForm1.FormCreate(Sender: TObject);
 
begin
 
ListBox1.Items.Add('Elif');
 
ListBox1.Items.Add('Anka');
 
ListBox1.Items.Add('Bilgisayar Programcılığı');
 
ListBox1.Items.Add('Akademi');
 
ListBox1.Items.Add('Meslek Yüksek Okulu');
 
ListBox1.Items.Add('2.sınıf');
 
ListBox1.Items.Add('Normal öğrenim');
 
  
 
end;
 
procedure TForm1.SECILENELEMANISIL1Click(Sender: TObject);
 
begin
 
ListBox1.Items.Delete(ListBox1.ItemIndex);
 
end;
 
procedure TForm1.SECILENELEMANSIRASI1Click(Sender: TObject);
 
begin
 
edit1.Text:=IntToStr(ListBox1.ItemIndex+1);
 
end;
 
  
 
procedure TForm1.OPLAMELEMANSAYISI1Click(Sender: TObject);
 
begin
 
edit1.Text:=IntToStr(ListBox1.Count);
 
end;
 
end.

Hiç yorum yok:

Yorum Gönder