Jump to content

Listbox İçinde Arama Yapmak


milano88

Recommended Posts

oradaki data.ini dosyasında listboxtaki isimler yazıyor hocam kısacası işime yaramıyor ben bilgisayardan bir klasör gösteriyorum ve içinde atıyorum 200 adet şarkı var bunlar çıkınca bunların içinden bulmasını istiyorum

Link to comment
Share on other sites

Şu kodu input> on key evresine yazarsan istediğin olacak sanırım:

[codebox]sMetin = Input.GetText(this)
nCount = ListBox.GetCount("ListBox1")
for i=1,nCount do
sText = ListBox.GetItemText("ListBox1", i)
nAra = String.Find(sText, sMetin, 1, false)
if nAra ~= -1 then
ListBox.SelectItem("ListBox1", i)
end
end
[/codebox]

Örnek dosyada şurda:

[codebox]http://www.tamotomatik.org/dosya/listbox_arama2.rar[/codebox]

Link to comment
Share on other sites

eğer Listbox özelliklerinden multiple selection'u işaretler ve alttaki kodları kullanırsan bu seferde inputa yazdığın metni içeren tüm öğeleri seçili hale getirir:

[codebox]sMetin = Input.GetText(this)
nCount = ListBox.GetCount("ListBox1")
for i=1, nCount do
ListBox.DeselectItem("ListBox1", i)
end

for i=1,nCount do
sText = ListBox.GetItemText("ListBox1", i)
nAra = String.Find(sText, sMetin, 1, false)
if nAra ~= -1 then
ListBox.SelectItem("ListBox1", i)
end
end
[/codebox]

Link to comment
Share on other sites

[quote name='milano88' date='03 Aralık 2010 - 17:43 ' timestamp='1291391581' post='920802']
Hocamız gerçekten çok çalışıyor değerini bilin arkadaşlar sağolun tekrardan.Teşekkür etmiyorum yalnız o yüzden butonu kullanın demenize gerek yok :D şaka,şaka 10 numarasınız vallaha ;)
[/quote]

Valla elimden geldiğince AMS nin TR'deki gelişimine katkıda bulunmak ve AMS'nin AIO'lardan farklı amaçlarla kullanılmasını sağlamaya çalışıyorum. Umarım başarılı oluyorumdur. Teşekkürler :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...