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

_ArrayDisplay

$
0
0
Trying to add some functionality to the command/function _ArrayDisplay, and I am a little stuck...I added the following to Array.au3, can someone help a little, after clicking the header of the display, I am trying to sort them based on the header clicked, I would like to keep the original bracketed numbers to the left of the display. Similar on how it displays now, but when I click it, it removes the first column and shifts everything to the left. I would like it to remain in place. Also, I was thinking that this code, when complete could be added to the _ArrayDisplay command?

This code was added to the Array.au3 file in the main while loop for the function _ArraysDisplay()

AutoIt         
  1. Case $hListView
  2.     Local $iIndexClicked = GUICtrlGetState($hListView)
  3.     Local $iColumnNumber = UBound($avArray, 2)
  4.     If $iColumnNumber = 0 Then Return
  5.     GUICtrlSendMsg($hListView, $_ARRAYCONSTANT_GUI_LVM_DELETEALLITEMS, 0, 0)
  6.     $aSortedArray = $avArray
  7.     ;
  8.     _ArraySort($aSortedArray, 0, 1, 0, $iIndexClicked)
  9.     ;
  10.     Local $avNewArray[UBound($aSortedArray, 1)]
  11.     For $i = 0 To UBound($aSortedArray) - 1
  12.         For $y = 0 To UBound($aSortedArray, 2) - 1
  13.             If $y <> UBound($aSortedArray, 2) - 1 Then
  14.                 $avNewArray[$i] &= $aSortedArray[$i][$y] & '|'
  15.             Else
  16.                 $avNewArray[$i] &= $aSortedArray[$i][$y]
  17.             EndIf
  18.         Next
  19.     Next
  20.     ;
  21.     For $z = 0 To UBound($avNewArray) - 1
  22.         GUICtrlCreateListViewItem($avNewArray[$z], $hListView)
  23.     Next

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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