Retrieve the number of columns
#include <GuiListView.au3>
_GUICtrlListView_GetColumnCount ( $hWnd )
$hWnd | Control ID/Handle to the control |
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $idListview
GUICreate("ListView Get Column Count", 400, 300)
$idListview = GUICtrlCreateListView("col1|col2|col3", 2, 2, 394, 268)
GUISetState(@SW_SHOW)
MsgBox($MB_SYSTEMMODAL, "Information", "Column Count: " & _GUICtrlListView_GetColumnCount($idListview))
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example