Jump to content

Listboxex Getcheckedıtems Kontrol


korasoglu
 Share

Recommended Posts

Arkadaşlar ListBoxExte Check yapılma olayını çözemedim yardimcı olursanız sevinirim

seçilirse şu işlem seçilmezse şu işlem gibi kullandığım kodlar

 

sec = ListBoxEx.GetCheckedItems("Plugin1");
if (sec ~= nil) then
Dialog.Message("Notice", "Seçilen Index : "..sec[1], MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
INIFile.SetValue(_DesktopFolder.."\\aa.ini", sec[1], "1", "text");
end
 İlk seçimimde doğru sayıyı veriyor diğer tıklarda sonuç hep aynı oluyor.
Link to comment
Share on other sites

  • Editor

Ben olayı yanlış anlamışım :D Siz seçilenleri listelemek istemişsiniz sanırım.

result = ListBoxEx.GetCheckedItems("Plugin1");
for i,v in pairs(result) do
	local sText = ListBoxEx.GetItemText("Plugin1", v, true);
 	Dialog.Message("",sText);
end

bu şekilde seçilenleri listeleyebilirsiniz.

Link to comment
Share on other sites

Doğru anlamışın ben seçilirse yazmasını iptal edilirse silmesini istiyorum

Peki Neresi yanlış bu kodun

Birde local eklemenin anlamı nedir

sec = ListBoxEx.GetCheckedItems("Plugin1");
if (sec == true) then
INIFile.SetValue(_DesktopFolder.."\\aa.ini", e_Index, "1", text);
INIFile.SetValue(_DesktopFolder.."\\aa.ini", e_Index, "2", link);
Dialog.Message("Notice", "Seçildi", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
INIFile.DeleteSection(_DesktopFolder.."\\aa.ini", e_Index);
Dialog.Message("Notice", "İptal", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
Edited by korasoglu
Link to comment
Share on other sites

  • Editor

Abi anlamadığım şu şimdi sen seçiceskin ve bi butona basınca seçilileri ekleyecek seçili olmayanları silecekmi yoksa sen listboxdan seçtikçe varsa ekleyecek seçmediysende silecekmi.

Link to comment
Share on other sites

hayır seçecem iniye yezacak seçimi iptal edince silecek buton filan yok aşağıdaki gibi

Duzeltme:

text değişkeni itemin texti sorun yok alıyor
link değişkeni itemin datası ondada sorun yok alıyor
seçildimi itemin texttini text değişkenine yükleyip yazacak itemindatasını link değişkenine yükleyip yazacak iptal edersede yazdıklarını silecek

 

 

sec = ListBoxEx.GetCheckedItems("Plugin1");
if (sec == true) then
INIFile.SetValue(_DesktopFolder.."\\aa.ini", e_Index, "1", text);
INIFile.SetValue(_DesktopFolder.."\\aa.ini", e_Index, "2", link);
Dialog.Message("Notice", "Seçildi", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
else
INIFile.DeleteSection(_DesktopFolder.."\\aa.ini", e_Index);
Dialog.Message("Notice", "İptal", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
Edited by korasoglu
Link to comment
Share on other sites

Pairs olmadı yapamadım

elseif secim == 300 then
local sSelected = ListBoxEx.GetSelectedItem("Plugin1");
ListBoxEx.SetItemCheck("Plugin1", sSelected,false, false);
end
 
Bu sekilde table menude seçimi iptal etmedi ama buton da deneyince yapıyor gözden kaçan ne anlamadım
Link to comment
Share on other sites

ListBoxEx

--------------

if e_Checked then
text = INIFile.GetValue(_TempFolder .."\\_Listem.ini", "Liste", e_Index);
link = ListBoxEx.GetItemData("Plugin1", e_Index)
menu()
if sonuc ~= 1 then
Dialog.Message("Notice", "İndirme Türünü Seçmediniz", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
menu()
end
 
nasil = File.DoesExist(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini");
if nasil == true then
toplam=toplam+1
INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "isim", text);
INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "id", link);
INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "icon", _SourceFolder.."\\MP3\\Download\\Indir\\Beklemede.png");
INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "tur", tur);
INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "durum", "Beklemede");
 
else
toplam=0
toplam=toplam+1
INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "isim", text);
INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "id", link);
INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "icon", _SourceFolder.."\\MP3\\Download\\Indir\\Beklemede.png");
INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "tur", tur);
INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "durum", "Beklemede");
--Shell.Execute(_SourceFolder.."\\Isa Avci\\Download\\Indir.exe", "open", "", "", SW_SHOWNORMAL, false);
end
else
INIFile.DeleteSection(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam);
toplam=toplam-1
end
--------------
Global
------------
function menu()
tblMenu = {};    
tblMenu[1] ={};
tblMenu[1].Text = "Mp3 İndir";
tblMenu[1].ID = 100;
tblMenu[1].IconID = 1;
tblMenu[1].Checked = false;
tblMenu[1].Enabled = true; 
tblMenu[2] ={};
tblMenu[2].Text = "İptal";
tblMenu[2].ID = 200;
tblMenu[2].IconID = 2;
tblMenu[2].Checked = false;
tblMenu[2].Enabled = true;
konum = System.GetMousePosition(true, Application.GetWndHandle());
islem = Application.ShowPopupMenu(konum.X, konum.Y, tblMenu, TPM_LEFTALIGN, TPM_TOPALIGN, true, true);
  
if islem == 100 then
sonuc=1
tur = "Mp3"
elseif islem == 200 then
local sSelected = ListBoxEx.GetSelectedItem("Plugin1");
ListBoxEx.SetItemCheck("Plugin1", sSelected, true, false);
INIFile.DeleteSection(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam);
toplam=toplam-1
end
end
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...