Function Reference


_GUICtrlTreeView_GetVisible

Indicates whether the item is currently visible in the control image

#include <GuiTreeView.au3>
_GUICtrlTreeView_GetVisible ( $hWnd, $hItem )

Parameters

$hWnd Control ID/Handle to the control
$hItem Handle to the item

Return Value

True: Item is visible in the control image.
False: Item is not visible in the control image.

Related

_GUICtrlTreeView_EnsureVisible

Example

#AutoIt3Wrapper_UseX64=y
#include <GUIConstantsEx.au3>
#include <GuiTreeView.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
        GUICreate("TreeView Get Visible (v" & @AutoItVersion & ")", 400, 300)

        Local $iStyle = BitOR($TVS_EDITLABELS, $TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS)
        Local $idTreeView = GUICtrlCreateTreeView(2, 2, 396, 268, $iStyle, $WS_EX_CLIENTEDGE)
        GUISetState(@SW_SHOW)

        ; Set ANSI format
        _GUICtrlTreeView_SetUnicodeFormat($idTreeView, False)

        _GUICtrlTreeView_BeginUpdate($idTreeView)
        Local $ahItem[100]
        For $x = 0 To 99
                $ahItem[$x] = _GUICtrlTreeView_Add($idTreeView, 0, StringFormat("[%02d] New Item", $x))
        Next
        _GUICtrlTreeView_EndUpdate($idTreeView)

        Local $iRand = Random(40, 99, 1)
        MsgBox($MB_SYSTEMMODAL, "Information", StringFormat("Index %d Visible: %s", $iRand, _GUICtrlTreeView_GetVisible($idTreeView, $ahItem[$iRand])))
        _GUICtrlTreeView_EnsureVisible($idTreeView, $ahItem[$iRand])
        MsgBox($MB_SYSTEMMODAL, "Information", StringFormat("Index %d Visible: %s", $iRand, _GUICtrlTreeView_GetVisible($idTreeView, $ahItem[$iRand])))

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