Function Reference


_GUICtrlComboBox_ResetContent

Remove all items from the ListBox and edit control of a ComboBox

#include <GuiComboBox.au3>
_GUICtrlComboBox_ResetContent ( $hWnd )

Parameters

$hWnd Control ID/Handle to the control

Return Value

None.

Related

_GUICtrlComboBox_AddString, _GUICtrlComboBox_DeleteString

Example

#include <GuiComboBox.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
        Local $idCombo

        ; Create GUI
        GUICreate("ComboBox Reset Content", 400, 296)
        $idCombo = GUICtrlCreateCombo("", 2, 2, 396, 296, BitOR($CBS_SIMPLE, $CBS_DISABLENOSCROLL, $WS_VSCROLL))
        GUISetState(@SW_SHOW)

        ; Set Edit Text
        _GUICtrlComboBox_SetEditText($idCombo, "Edit Text")

        ; Add files
        _GUICtrlComboBox_BeginUpdate($idCombo)
        _GUICtrlComboBox_AddDir($idCombo, @WindowsDir & "\*.exe")
        _GUICtrlComboBox_EndUpdate($idCombo)

        Sleep(500)

        ; Reset content
        _GUICtrlComboBox_ResetContent($idCombo)

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