Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Sorting a ListView

$
0
0
I have a ListView that is created from a FileRead() using delimiters and then added into the ListView as shown below.
[ autoit ]      
       Local $src = InetGet($url, $file, 1)         $data = FileRead($file)         $array = StringSplit($data, ";", 1)         FileDelete($file)         For $n = 1 To UBound($array) - 1 Step 3             $iItem = _GUICtrlListView_AddItem($ListView, $array[$n])             $a = UBound($array) - 1             If $n + 1 > $a Then                 ExitLoop             Else                 _GUICtrlListView_AddSubItem($ListView, $iItem, $array[$n + 1], 1)                 _GUICtrlListView_AddSubItem($ListView, $iItem, $array[$n + 2], 2)             EndIf         Next         $PlayerCount = _GUICtrlListView_GetItemCount($ListView)         _GUICtrlListView_SetColumn($ListView, 0, "Name (Online: " & $Count & ")")

I was using _GUICtrlListView_SortItems to sort them and it appears to work correctly in that it adds the up and down arrow to the column but nothing moves. I tried another one that involved using DLL's but that didn't work either. Am I missing something or what?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>