31 Ocak 2014 Cuma

ComboBox eleman ekle,eleman sayısı bul

1ComboBox,3button,1Memo,1Edit ekleyerek; eleman sayısını bulan,eleman ekleyen,memo bileşenindeki elemanları ComboBox’a ekleyen programın kodu. 
Kodu;
?
procedure TForm1.Button1Click(Sender: TObject);
 
var
 
elemanSayisi : Integer;
 
begin
 
elemanSayisi := ComboBox1.Items.Count;
 
ShowMessage(IntToStr(elemanSayisi));
 
  
 
end;
 
  
 
procedure TForm1.Button2Click(Sender: TObject);
 
begin
 
ComboBox1.Items.add(Edit1.Text);
 
end;
 
procedure TForm1.Button3Click(Sender: TObject);
 
begin
 
ComboBox1.Items.Assign(Memo1.Lines);
 
end;
 
end.


Hiç yorum yok:

Yorum Gönder