Function Reference


_GUICtrlListView_Arrange

Arranges items in icon view

#include <GuiListView.au3>
_GUICtrlListView_Arrange ( $hWnd [, $iArrange = 0] )

Parameters

$hWnd Control ID/Handle to the control
$iArrange [optional] Alignment. This can be one of the following values:
    0 - Aligns items according to the controls default value
    1 - Aligns items along the left edge of the window
    2 - Aligns items along the top edge of the window
    3 - Snaps all icons to the nearest grid position.

Return Value

Success: True.
Failure: False.

Related

_GUICtrlListView_SetItemPosition

Example

#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
        Local $idListview

        GUICreate("ListView Arrange", 400, 300)
        $idListview = GUICtrlCreateListView("", 2, 2, 394, 268)
        GUISetState(@SW_SHOW)

        ; Add columns
        _GUICtrlListView_InsertColumn($idListview, 0, "Items", 100)

        ; Add items
        _GUICtrlListView_BeginUpdate($idListview)
        For $iI = 1 To 10
                _GUICtrlListView_AddItem($idListview, "Item " & $iI)
        Next
        _GUICtrlListView_EndUpdate($idListview)

        ; Move item 2
        _GUICtrlListView_SetView($idListview, 3)
        _GUICtrlListView_SetItemPosition($idListview, 1, 100, 100)

        MsgBox($MB_SYSTEMMODAL, "Information", "Arranging items")
        _GUICtrlListView_Arrange($idListview)

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
EndFunc   ;==>Example