Forces the control to redraw a range of items
#include <GuiListView.au3>
_GUICtrlListView_RedrawItems ( $hWnd, $iFirst, $iLast )
$hWnd | Control ID/Handle to the control |
$iFirst | 0-based index of the first item to redraw |
$iLast | 0-based index of the last item to redraw |
Success: | True. |
Failure: | False. |
The specified items are not actually redrawn until the control receives a $WM_PAINT message to repaint.
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
Example()
Func Example()
Local $idListview
GUICreate("ListView Redraw Items", 400, 300)
$idListview = GUICtrlCreateListView("", 2, 2, 394, 268)
GUISetState(@SW_SHOW)
; Add column
_GUICtrlListView_AddColumn($idListview, "Items", 100)
; Add items
_GUICtrlListView_BeginUpdate($idListview)
For $iI = 1 To 10
_GUICtrlListView_AddItem($idListview, "Item " & $iI)
Next
_GUICtrlListView_EndUpdate($idListview)
; Redraw items
_GUICtrlListView_RedrawItems($idListview, 0, 9)
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example