Function Reference

_GUICtrlListView_Arrange

アイコン表示のアイテムを整列させます。

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

 

パラメータ

$hWnd コントロールのハンドル
$iArrange [オプション]整列方法。次の値のいずれかです:
0 - コントロールのデフォルト値に従ってアイテムを整列させます
1 - ウィンドウの左端に沿ってアイテムを整列させます
2 - ウィンドウの上端に沿ってアイテムを整列させます
3 - 全てのアイコンを最も近いグリッド座標に配置します

 

返し値

成功: True
失敗: False

 

注意

なし。

 

関連

_GUICtrlListView_SetItemPosition

 


#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>

Opt('MustDeclareVars', 1)

$Debug_LV = False ; ListView関数に渡されるClassNameを調べる。動作を確認するにはTrueを設定し、他のコントロールのハンドルを使用

_Main()

Func _Main()
    Local $hListView
   
    GUICreate("ListView Arrange", 400, 300)
    $hListView = GUICtrlCreateListView("", 2, 2, 394, 268)
    _GUICtrlListView_SetUnicodeFormat($hListView, False)
    GUISetState()
   
    ; 列を追加
    _GUICtrlListView_InsertColumn($hListView, 0, "Items", 100)

    ; アイテムを追加
    _GUICtrlListView_BeginUpdate($hListView)
    For $iI = 1 To 10
        _GUICtrlListView_AddItem($hListView, "Item " & $iI)
    Next
    _GUICtrlListView_EndUpdate($hListView)

    ; アイテム2を移動
    _GUICtrlListView_SetView($hListView, 3)
    _GUICtrlListView_SetItemPosition($hListView, 1, 100, 100)
   
    MsgBox(4160, "Information", "Arranging items")
    _GUICtrlListView_Arrange($hListView)
   
    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main