Function _GUICtrlListView_GetISearchString

Function Reference


Retrieves the incremental search string of the control

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


$hWnd Control ID/Handle to the control

Return Value

Returns an Incremental search string or an empty string if no search string exists.


The incremental search string is the character sequence that the user types while the list view has the input focus.
Each time the user types a character, the system appends the character to the search string and then searches for a matching item.
If the system finds a match, it selects the item and, if necessary, scrolls it into view.

A time-out period is associated with each character that the user types.
If the time-out period elapses before the user types another character, the incremental search string is reset.


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


Func Example()
    Local $hImage, $idListview

    GUICreate("ListView Get ISearch", 400, 300)

    $idListview = GUICtrlCreateListView("", 2, 2, 394, 268)
    GUICtrlSetStyle($idListview, $LVS_ICON)

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

    For $x = 1 To 10
        _GUICtrlListView_InsertItem($idListview, "Item " & $x, -1, 0)

    Send("Item 1")

    ; Get incremental search string
    MsgBox($MB_SYSTEMMODAL, "Information", "Incremental Search String: " & _GUICtrlListView_GetISearchString($idListview))

    ; Loop until the user exits.
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

EndFunc   ;==>Example