Function Reference


_GUICtrlListView_GetOriginY

Retrieves the current vertical view origin for the control

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

Parameters

$hWnd Control ID/Handle to the control

Return Value

Returns the view Y position.

Related

_GUICtrlListView_GetOrigin

Example

#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <GuiListView.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
        Local $iX, $iY, $hImage, $idListview

        GUICreate("ListView Get Origin Y", 400, 300)
        $idListview = GUICtrlCreateListView("", 2, 2, 394, 268)
        GUICtrlSetStyle($idListview, $LVS_ICON)
        GUISetState(@SW_SHOW)

        ; Load images
        $hImage = _GUIImageList_Create()
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0xFF0000, 16, 16))
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x00FF00, 16, 16))
        _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($idListview, 0x0000FF, 16, 16))
        _GUICtrlListView_SetImageList($idListview, $hImage, 0)

        ; Add columns
        _GUICtrlListView_AddColumn($idListview, "Items", 100)

        ; Add items
        _GUICtrlListView_AddItem($idListview, "Item 1", 0)
        _GUICtrlListView_AddItem($idListview, "Item 2", 1)
        _GUICtrlListView_AddItem($idListview, "Item 3", 2)

        ; Get current origin
        $iX = _GUICtrlListView_GetOriginX($idListview)
        $iY = _GUICtrlListView_GetOriginY($idListview)
        MsgBox($MB_SYSTEMMODAL, "Information", StringFormat("Origin: X=%d, Y=%d", $iX, $iY))

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
EndFunc   ;==>Example