#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $aInfo, $idListview
GUICreate("调整 ListView 列", 400, 300)
$idListview = GUICtrlCreateListView("", 2, 2, 394, 268)
GUISetState(@SW_SHOW)
; 添加列
_GUICtrlListView_AddColumn($idListview, "列 1", 100)
_GUICtrlListView_AddColumn($idListview, "列 2", 100,2)
_GUICtrlListView_AddColumn($idListview, "列 3", 100,2)
_GUICtrlListView_AddItem($idListview, 1)
_GUICtrlListView_AddSubItem($idListview,0,1,1)
_GUICtrlListView_AddSubItem($idListview,0,1,2)
_GUICtrlListView_AddItem($idListview, 2)
_GUICtrlListView_AddSubItem($idListview,1,2,1)
_GUICtrlListView_AddSubItem($idListview,1,2,2)
;~ _GUICtrlListView_JustifyColumn($idListview,0,1)
;~ _GUICtrlListView_JustifyColumn($idListview,1,2)
_GUICtrlListView_JustifyColumn($idListview,2,1)
_GUICtrlListView_AddItem($idListview, 3)
_GUICtrlListView_AddSubItem($idListview,2,3,1)
_GUICtrlListView_AddSubItem($idListview,2,3,2)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example