ListView item checked sorunu

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
saygıner
Üye
Mesajlar: 9
Kayıt: 11 Ağu 2014 02:41

ListView item checked sorunu

Mesaj gönderen saygıner »

Merhabalar Listview'de sadece DRIVE_FIXED yerel sürücüleri seçili nasıl yapabilirim
checked yapınca tümünü seçiyor.

Kod: Tümünü seç

function TMainMenu.CreateDrives(ListView: TListView): boolean;
  var
  S : string;
begin
  ListView.Clear;
      with ListView.Items.Add do begin
        Caption := S;
        if GetDriveType(PChar(S)) = DRIVE_RAMDISK then ImageIndex := 3;
        if GetDriveType(PChar(S)) = DRIVE_FIXED then ImageIndex := 3;
        if GetDriveType(PChar(S)) = DRIVE_REMOTE then ImageIndex := 0;
        if GetDriveType(PChar(S)) = DRIVE_CDROM then ImageIndex := 1;
        if GetDriveType(PChar(S)) = DRIVE_REMOVABLE then ImageIndex := 2;
      end;
      S := '';
    end;
  end;
Kullanıcı avatarı
SimaWB
Üye
Mesajlar: 1316
Kayıt: 07 May 2009 10:42
Konum: İstanbul
İletişim:

Re: ListView item checked sorunu

Mesaj gönderen SimaWB »

Kod: Tümünü seç

if GetDriveType(PChar(S)) = DRIVE_FIXED then 
begin
  ImageIndex := 3;
  Checked := True;
end;
There's no place like 127.0.0.1
saygıner
Üye
Mesajlar: 9
Kayıt: 11 Ağu 2014 02:41

Re: ListView item checked sorunu

Mesaj gönderen saygıner »

çok teşekkürler.iyi bu forumu buldum admine sayğılar sunarım.
Cevapla