scila1996 0 Posted April 24, 2014 #include <GUIConstantsEx.au3> #include <GuiTreeView.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> Opt("GUIOnEventMode",1) Local $hGUI = GUICreate("ControlTreeView Example", 212, 212) Local $iTreeView_1 = GUICtrlCreateTreeView(6, 6, 200, 160, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_CHECKBOXES), $WS_EX_CLIENTEDGE) Local $hTreeView_1 = ControlGetHandle($hGUI, "", $iTreeView_1) Local $but = GUICtrlCreateButton("Click Me",120,175,70,30) Local $iRoot = GUICtrlCreateTreeViewItem(" Select Drive", $iTreeView_1) Local $dg = DriveGetDrive("FIXED") For $itest = 1 To $dg[0] GUICtrlCreateTreeViewItem(StringUpper($dg[$itest]), $iRoot) Next _GUICtrlTreeView_Expand($iTreeView_1) GUISetState(@SW_SHOW, $hGUI) GUISetOnEvent(-3,"_clickexit") Func _clickexit() Exit EndFunc While 1 Sleep(10) WEnd I have created a list of tree drive But I know the event or set the variable if one or more of the selected drive I have 2 problems + If I check the box "Select Drive" ---> automatic check on the drive + Click Me When click will list the selected drive Share this post Link to post Share on other sites
jguinch 432 Posted April 25, 2014 An example >here (with onevent mode) Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Share this post Link to post Share on other sites