devilyn 0 Posted April 6, 2011 I wrote this test script bellow to try to find a way to deselect a tree-view item But for some reason _GUICtrlTreeView_GetSelection still returns an item selected. #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> #Include <WinAPI.au3> #include <GuiTreeView.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 625, 443, 192, 124) $List1 = GUICtrlCreateTreeView("", 10, 500, 225, 149) GUICtrlCreateTreeViewItem("one",$List1) GUICtrlCreateTreeViewItem("two",$List1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### HotKeySet("a","test") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func test() _GUICtrlTreeView_SetSelected($List1,_GUICtrlTreeView_GetSelection($List1), False) ConsoleWrite(_GUICtrlTreeView_GetSelection($List1)&@CRLF) EndFunc Thanks in advance Share this post Link to post Share on other sites