Kral__ Posted October 9, 2011 Share Posted October 9, 2011 nSecim = ListBox.GetSelected("list") if nSecim ~= nil then strSecim = ListBox.GetItemText("list", nSecim[1]) ListBox.DeleteItem("list", nSecim[1]) elseif nSecim == nil then result = Dialog.Message("Hata", "Silmek İçin Seçim Yapmalısınız !", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1); end bu kodlarla sadece tek tek silebiliyorum peki hepsini nasıl sildirebilirim? Quote Link to comment Share on other sites More sharing options...
Cyph3r Posted October 9, 2011 Share Posted October 9, 2011 [code]ListBox.DeleteItem("list", LB_ALLITEMS)[/code] olabilir mi acaba? Bende çalıştı gibi. Bende karıştırarak öğreniyorum valla. Dikkat ediyorumda bazı soruların aslında karıştırarak çok kolay bulunuyor. Quote Link to comment Share on other sites More sharing options...
NotToday Posted October 9, 2011 Share Posted October 9, 2011 (edited) [quote name='TugruL' date='09 October 2011 - 11:29 ' timestamp='1318148975' post='1092176'] [code]ListBox.DeleteItem("list", LB_ALLITEMS)[/code] olabilir mi acaba? Bende çalıştı gibi. Bende karıştırarak öğreniyorum valla. Dikkat ediyorumda bazı soruların aslında karıştırarak çok kolay bulunuyor. [/quote] Tam olarak istediği listbaxdakilerin tamamını silmek ise kod doğru.Ben yazacaktım ama ne istediğini anlamamıştım Tek Tek sildirme ise [code]ListBox.DeleteItem("ListBox1", 1);[/code] Edited October 9, 2011 by ReaLyMaN Quote Link to comment Share on other sites More sharing options...
KintaRo Posted October 9, 2011 Share Posted October 9, 2011 [code]ListBox.DeleteItem("ListBox1", -1);[/code] yazarakta hepsini sildirebilirsiniz Quote Link to comment Share on other sites More sharing options...
Kral__ Posted October 9, 2011 Author Share Posted October 9, 2011 peki tuğrul hocamızınkinden farkı nedir ? Quote Link to comment Share on other sites More sharing options...
KintaRo Posted October 9, 2011 Share Posted October 9, 2011 hiç bir farkı yok bilgi için söyledim Quote Link to comment Share on other sites More sharing options...
radyofon Posted October 9, 2011 Share Posted October 9, 2011 [quote name='KintaRo' date='09 October 2011 - 12:10 ' timestamp='1318151452' post='1092209'] [code]ListBox.DeleteItem("ListBox1", -1);[/code] yazarakta hepsini sildirebilirsiniz [/quote] Üstadımın yazdığı koddaki -1 ifadesi bir önceki satır için bu işi uygula anlamına gelmektedir. Yani bu komutu yazarken satır yerini doğru seçmelisin. Umarım yanlış bilgilendirmemişimdir. Deneyerek görebilirsin. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted October 9, 2011 Share Posted October 9, 2011 yoo verdiğim kod tüm satirlari siler Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted October 16, 2011 Share Posted October 16, 2011 [center][b]Peki Checkbox'lu Bir ListBox'ta Seçilenleri Nasıl Sildiririz ?[/b][/center] Quote Link to comment Share on other sites More sharing options...
KintaRo Posted October 18, 2011 Share Posted October 18, 2011 [code]tSecilenler = ListBox.GetChecked("ListBox1", BST_CHECKED) if tSecilenler then for i,v in pairs(tSecilenler) do ListBox.DeleteItem("ListBox1", (v-i)+1) end end[/code] 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.