#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>
#Include <GuiListView.au3> ; UDF!!
Dim $msg, $gui, $list, $listitem
$gui = GUICreate("test", 250, 350)
$list = GUICtrlCreateListView("test", 10, 10, 230, 330, -1, $LVS_EX_CHECKBOXES)
$listitem = GUICtrlCreateListViewItem("testitem", $list)
; Next sentence is to set the width of the column automatically to the largest width of all items
_GUICtrlListView_SetColumnWidth($list, 0, $LVSCW_AUTOSIZE) ; This is not AutoIt native! It's a User Defind Function. Someone made it and AutoIt included this for you! You also need the above include.
GUISetState()
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd
|