Function Reference


_GUICtrlListView_GetColumnCount

Retrieve the number of columns

#include <GuiListView.au3>
_GUICtrlListView_GetColumnCount ( $hWnd )

Parameters

$hWnd Control ID/Handle to the control

Return Value

Returns the number of columns.

Example

#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