bitmez13 Posted June 29, 2012 Share Posted June 29, 2012 listboxa veriyi alıyorum aynı zamanda yeni verileride ekliyorum ama eklenenler hep alt alta oluyor.ben istiyorumki listboxdaki veriler a-z ye otomatik sıralansın bunun için nasıl bir kod yazmalıyım ali veli selami fevzi şeklindeki listbox verileri otomatik olarak ali fevzi selami veli şeklinde sıralnamasını istiyorum kodda yardımcı olurmusunuz. Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted June 29, 2012 Share Posted June 29, 2012 ListBox özelliklerinden Sort(Sırala) kısmını işaretlemelisin ; [img]http://i.imgur.com/SWE7i.png[/img] Quote Link to comment Share on other sites More sharing options...
pilgetir Posted June 29, 2012 Share Posted June 29, 2012 (edited) baba_ yetişmiş zaten Edited June 29, 2012 by pilgetir Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 29, 2012 Share Posted June 29, 2012 verileri sıralamanın en kolay yolu Table.Sort() 'dur. Tabi bunun için veriler bir tabloda depolanmalıdır. Örneğin isimleri alıp sıraladıktan sonra ListBox nesnesine yazdıralım: [code]tIsimler = {"ali", "veli", "selami", "cemil"} Table.Sort(tIsimler, nil) for i,v in pairs (tIsimler) do ListBox.AddItem("ListBox1", v, "") end[/code] Quote Link to comment Share on other sites More sharing options...
bitmez13 Posted June 29, 2012 Author Share Posted June 29, 2012 teşekkürler peki veriyi txt dosyasından alıyorsa tablodan değilde otomatik olarak o zaman nasıl sıralatabiliriz Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted June 29, 2012 Editor Share Posted June 29, 2012 işi neden zora koşuyorsun anlamıyorum tablesort kullan işte bir satırlık kod. Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted June 29, 2012 Share Posted June 29, 2012 [color="#8B0000"]Veriyi txt dosyasından tablo olarak al o zaman Hem verinin bi önemi yok, Sort seçeneğini işaretle, gerisini kendisi hallediyor.[/color] 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.