UDF > GUI > GuiListBox >


_GUICtrlListBox_BeginUpdate

Empêche la mise à jour du contrôle jusqu'à ce que la fonction EndUpdate soit appelée

#include <GuiListBox.au3>
_GUICtrlListBox_BeginUpdate ( $hWnd )

Paramètre

$hWnd ID/handle du contrôle

Valeur de retour

Succès: Retourne True.
Échec: Retourne False.

En relation

_GUICtrlListBox_EndUpdate

Exemple

#include <GUIConstantsEx.au3>
#include <GuiListBox.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
    Local $idListBox

    ; Crée une GUI
    GUICreate("List Box Begin Update", 400, 296)
    $idListBox = GUICtrlCreateList("", 2, 2, 396, 296)
    GUISetState(@SW_SHOW)

    ; Ajoute des fichiers
    _GUICtrlListBox_BeginUpdate($idListBox)
    _GUICtrlListBox_ResetContent($idListBox)
    _GUICtrlListBox_InitStorage($idListBox, 100, 4096)
    _GUICtrlListBox_Dir($idListBox, @WindowsDir & "\win*.exe")
    _GUICtrlListBox_AddFile($idListBox, @WindowsDir & "\notepad.exe")
    _GUICtrlListBox_Dir($idListBox, "", $DDL_DRIVES)
    _GUICtrlListBox_Dir($idListBox, "", $DDL_DRIVES, False)
    _GUICtrlListBox_EndUpdate($idListBox)

    ; Boucle jusqu'à ce que l'utilisateur quitte.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example