stefanoa Active Member Licensed User Longtime User Aug 8, 2012 #1 1) there's a way to SORT the elements in lstaudio (ClsCheckList) ? what's the syntax? Code: Copy Dim lstAudio As ClsCheckList .... lstAudio.SortItems(????,0,lstAudio.NumberOfItems,True) '???? 2) when i have the HEADER (Artists), how can i sort the elements (ex. by Artist/Songs) ?? Code: Copy If Artist <> DernArtist Then lstAudio.AddHeader(Artist) DernArtist = Artist End If lstAudio.AddItemNoChkbx(fm.Get("ID" & ix), fm.Get("Title" & ix), fm.Get("Location" & ix), Null) .... So i have: >> Artist 1 >> song1 >> song2 >> Artist 2 >> songA >> songB 3) when i set HEADER (lstAudio.AddHeader...) there is a way to obtain the INITIAL LETTER of header elements with ClsScrollPanel ? (so only initial of artists and not of songs) thanks
1) there's a way to SORT the elements in lstaudio (ClsCheckList) ? what's the syntax? Code: Copy Dim lstAudio As ClsCheckList .... lstAudio.SortItems(????,0,lstAudio.NumberOfItems,True) '???? 2) when i have the HEADER (Artists), how can i sort the elements (ex. by Artist/Songs) ?? Code: Copy If Artist <> DernArtist Then lstAudio.AddHeader(Artist) DernArtist = Artist End If lstAudio.AddItemNoChkbx(fm.Get("ID" & ix), fm.Get("Title" & ix), fm.Get("Location" & ix), Null) .... So i have: >> Artist 1 >> song1 >> song2 >> Artist 2 >> songA >> songB 3) when i set HEADER (lstAudio.AddHeader...) there is a way to obtain the INITIAL LETTER of header elements with ClsScrollPanel ? (so only initial of artists and not of songs) thanks
elbelli2013 Member Licensed User Longtime User Apr 3, 2014 #2 Hi, maybe this help You. Dim myContact As Contact Dim map1 As Map map1.Initialize Dim list1 As List list1.Initialize For i = 0 To Main.listOfContacts.Size - 1 'List of all contactas myContact = Main.listOfContacts.Get(i) list1.Add(myContact.DisplayName) map1.Put(myContact.DisplayName, myContact) Next list1.Sort(True) Done, now You need add elements in clscheklist For i = 0 To list1.Size - 1 myContact = map1.Get(list1.Get(i)) photo = myContact.GetPhoto If photo <> Null Then b1 = photo Else b1 = imgDefault End If If myContact.phonenumber<>"" Then lst.AddItem(i, False, myContact.phonenumber, myContact.Name,b1) Next regards. Upvote 0
Hi, maybe this help You. Dim myContact As Contact Dim map1 As Map map1.Initialize Dim list1 As List list1.Initialize For i = 0 To Main.listOfContacts.Size - 1 'List of all contactas myContact = Main.listOfContacts.Get(i) list1.Add(myContact.DisplayName) map1.Put(myContact.DisplayName, myContact) Next list1.Sort(True) Done, now You need add elements in clscheklist For i = 0 To list1.Size - 1 myContact = map1.Get(list1.Get(i)) photo = myContact.GetPhoto If photo <> Null Then b1 = photo Else b1 = imgDefault End If If myContact.phonenumber<>"" Then lst.AddItem(i, False, myContact.phonenumber, myContact.Name,b1) Next regards.