本帖最后由 nuoyan 于 2021-9-18 21:08 编辑 #Include <File.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 312, 530, 192, 124)
$TreeView1 = GUICtrlCreateTreeView(64, 24, 193, 385, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)
$FileList = _FileListToArray(@SystemDir & "", "*", 2)
For $y = 1 To $FileList[0]
$generalitem1 = GUICtrlCreateTreeViewItem($FileList[$y],$TreeView1)
$generalitem2 = GUICtrlCreateTreeViewItem($FileList[$y],$generalitem1)
Next
$Button1 = GUICtrlCreateButton("清空数据", 104, 448, 107, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
请教下清空TreeView 控件 所有创建的项 要怎么写
|