procedure TForm1.SpeedButton6Click(Sender: TObject);
VAR
okunmus,okunmamis,i, sayi : integer;
begin
sayi := ListView1.Items.Count ;
try
if (sayi > 0) then
begin
okunmus := 0;
okunmamis := 0 ;
ListBox1.Clear;
for i:= 0 to ListView1.Items.Count do
begin
IF ListView1.Items.Item[i].SubItems.Strings[3] = 'Okunmuş' then begin okunmus := okunmus + 1 end;
IF ListView1.Items.Item[i].SubItems.Strings[3] = 'Okunmamış' then begin okunmamis := okunmamis + 1 end;
end;
ShowMessage(inttostr(okunmus));
Label2.Caption := 'Okunmuş Kayıt Sayısı : '+ inttostr(okunmus);
label3.Caption := 'Okunmamış Kayıt Sayısı : '+inttostr(okunmamis);
end;
except
end;
ben bunları lisbox'a alabiliyorum ama onuda sayamıyorum.
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ Forumun 365. Üyesi
Hiç Bir Şey İnsan Kadar Yükselemez ve Alçalamaz
procedure TForm9.Button1Click(Sender: TObject);
var
dogru,yanlis:integer;
begin
dogru := 0;
yanlis := 0;
Form1.YayinPlayListADOQuery1.first;
while not Form1.YayinPlayListADOQuery1.eof do
begin
if Form1.YayinPlayListADOQuery1.FieldByName('ICERIK').AsString= 'Spot' then
inc(dogru)
else
inc(yanlis);
Form1.YayinPlayListADOQuery1.next;
end;
Showmessage(inttostr(dogru)+' Doğru ve' +inttostr(yanlis)+' Yanlış cevap vardır');
end;
İşi bilen yardım eder, az bilen akıl verir, bilmeyen eleştirir, yapamayan ise çamur atar...
procedure TForm1.Button1Click(Sender: TObject);
var
a,b,i:integer;
begin
a:=0; b:=0; i:=0;
for i:=0 to ListView1.Items.Count-1 do
Begin
if ListView1.Items.Item[i].SubItems[3]= 'okundu' then
a:=a+1;
if ListView1.Items.Item[i].SubItems[3] = 'okunmadı' then
b:=b+1;
End;
Label1.Caption:=IntToStr(a);
Label2.Caption:=IntToStr(b);
end;
Nasibinde varsa, alırsın karıncadan bile ders, Nasibinde yoksa, bütün cihan önüne serilse, sana ters..
procedure TForm1.Button1Click(Sender: TObject);
var
a,b,i:integer;
begin
a:=0; b:=0; i:=0;
for i:=0 to ListView1.Items.Count-1 do
Begin
if ListView1.Items.Item[i].SubItems[3]= 'okundu' then
a:=a+1;
if ListView1.Items.Item[i].SubItems[3] = 'okunmadı' then
b:=b+1;
End;
Label1.Caption:=IntToStr(a);
Label2.Caption:=IntToStr(b);
end;
teşekkürler hocam çalıştı.
unicorn64 yazdı:koda breakpoint koyup ListView1.Items.Item.SubItems.Strings[3] değerini kontrol ettiniz mi?
listviewde width değeri 0 olan sütun var mı?
sütundaki değeri mesajbox ile alabiliyorsum hocam onu denemiştim ama yinede sağol
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ Forumun 365. Üyesi
Hiç Bir Şey İnsan Kadar Yükselemez ve Alçalamaz