need some help, i have a listview. i want display the last item only and delete the previous item(s). for instance if i have 4 items i will delete item 1, 2,3 only the 4 item will be visible on the listview, the code below seems to work partly thanks ahead
$aListViews = GUICtrlCreateListView("| UCS Subnet/ 28||", 76, 8, 361, 473, -1, BitOR($WS_EX_CLIENTEDGE,$LVS_EX_GRIDLINES,$LVS_EX_FULLROWSELECT)) ;56
if $Selection1 = True Then
$noip = $sValueread
; load row in listview
For $j = 1 To $noip
GUICtrlCreateListViewItem('Static|SREI' & StringFormat('%05d', $checknum) & 'RE0' & $j & '|' & $ip2[UBound($ip2) - 1] + 15 + $j, $aListViews)
;GUICtrlCreateListViewItem('Static|Register ' & $j & '|' & $ip2[UBound($ip2) - 1] + 15 + $j, $alistviews)
ConsoleWrite($j &"$noip"&@CRLF)
Next
ConsoleWrite(@CRLF)
For $j=1 To $noip-1
_GUICtrlListView_DeleteItem($aListviews, $j)
; _GUICtrlListView_DeleteItemsSelected($aListviews)
Next
the attach example the max item was 2, it should have deleted item 1, only item 2 should have been visible on the listview