home *** CD-ROM | disk | FTP | other *** search
- #include <GUIConstants.au3>
- #include <GuiList.au3>
-
- Opt ('MustDeclareVars', 1)
-
- Dim $msg, $ret
- Dim $listbox, $button
-
- GUICreate("ListBox Clear All Items Demo", 400, 250, -1, -1)
-
- $listbox = GUICtrlCreateList("", 125, 40, 180, 120)
- GUICtrlSetData($listbox, "test1|test2|test3|")
- $button = GUICtrlCreateButton("Clear All", 150, 160, 120, 40)
-
- GUISetState()
- While 1
- $msg = GUIGetMsg()
- Select
- Case $msg = $GUI_EVENT_CLOSE
- ExitLoop
- Case $msg = $button
- _GUICtrlListClear ($listbox)
- EndSelect
- WEnd
-