PColik Posted February 20, 2015 Share Posted February 20, 2015 Arkadaşlar bir butona tıklama ile ListBox'ta seçili olanı nasıl listeden kaldırtırım? Bu kodu kullandığımda her zaman en üsttekini siliyor: sec = ListBox.GetSelectedCount("ListBox1"); ListBox.DeleteItem("ListBox1", sec); Bu kodu kullandığımda ise her zaman en alttakini siliyor: sec = ListBox.GetCount("ListBox1"); ListBox.DeleteItem("ListBox1", sec); Quote Link to comment Share on other sites More sharing options...
Cyph3r Posted February 20, 2015 Share Posted February 20, 2015 sec = ListBox.GetSelected("ListBox1"); ListBox.DeleteItem("ListBox1", sec[1]); şeklinde deneyin birde... Quote Link to comment Share on other sites More sharing options...
PColik Posted February 20, 2015 Author Share Posted February 20, 2015 Sağol kardeşim. Aslında bunu denemiştim. Bu kod istediğim gibi çalışıyor fakat: Hiçbir şey seçmeden butona tıklayınca hata veriyor: Quote Link to comment Share on other sites More sharing options...
Cyph3r Posted February 20, 2015 Share Posted February 20, 2015 E onuda koşula bağla mübarek :D sec = ListBox.GetSelected("ListBox1"); if sec ~= nil then ListBox.DeleteItem("ListBox1", sec[1]); else Dialog.TimedMessage("", "Önce bişeyler seç ballisi...", 1000, MB_ICONINFORMATION); end Quote Link to comment Share on other sites More sharing options...
milano88 Posted February 20, 2015 Share Posted February 20, 2015 local sec = ListBox.GetSelected("ListBox1"); if ( sec ) then ListBox.DeleteItem("ListBox1", sec[1]); end Quote Link to comment Share on other sites More sharing options...
PColik Posted February 21, 2015 Author Share Posted February 21, 2015 Beyler uykulu uykulu AMS kullanınca en basit şeyi bile hatırlamayabiliyorum bazen. Ama bunu gerçekten bilmiyordum :D :D İkinize de çok teşekkür ederim. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.