wodzuu Posted July 12, 2006 Share Posted July 12, 2006 (edited) Hi, I have gui made with AutoIt Dim $handles[1] ... $treeview = GUICtrlCreateTreeView (10,125,270,275,BitOr($TVS_LINESATROOT,$TVS_DISABLEDRAGDROP,$TVS_SHOWSELALWAYS,$TVS_CHECKBOXES),$WS_EX_CLIENTEDGE) ... _ArrayAdd( $handles,GUICtrlCreateTreeViewitem ($file,$treeview)) ... and I have a problem that both: GUICtrlSetState ($handles[$i], $GUI_CHECKED) MsgBox(0,"",GUICtrlGetState($handles[$i])) and GUICtrlSetState ($handles[$i], $GUI_UNCHECKED) MsgBox(0,"",GUICtrlGetState($handles[$i])) Show me MessageBox with magic number 80. I need this to check in other part of my code which elements of tree are checked. Anyone can help ? Thanks in advance Edited July 12, 2006 by wodzuu Link to comment Share on other sites More sharing options...
/dev/null Posted July 12, 2006 Share Posted July 12, 2006 Show me MessageBox with magic number 80. I need this to check in other part of my code which elements of tree are checked.see GUIConstants.au3 in AutoIT include dir.80 = 64 + 16 = $GUI_ENABLE + $GUI_SHOWCheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
wodzuu Posted July 12, 2006 Author Share Posted July 12, 2006 (edited) see GUIConstants.au3 in AutoIT include dir.80 = 64 + 16 = $GUI_ENABLE + $GUI_SHOWCheersKurtSo number 80 doesn't provide any information about wheter it's checked or not Do yo know how to check it ?I understand that I should expect 81 or 84 Edited July 12, 2006 by wodzuu Link to comment Share on other sites More sharing options...
/dev/null Posted July 12, 2006 Share Posted July 12, 2006 So number 80 doesn't provide any information about wheter it's checked or not Do yo know how to check it ?I understand that I should expect 81 or 84actually I don't know what exactly you want to check.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
wodzuu Posted July 12, 2006 Author Share Posted July 12, 2006 actually I don't know what exactly you want to check. Cheers Kurt I wan to do something (if statement) when one of treeViewItem's has state $GUI_CHECKED. I do it in a loop: For $i = 1 to $items Step 1 if (GUICtrlGetState($handles[$i]) == $GUI_CHECKED) then ;-----loop endif Next where $items is a number of items in a treeView, $handles is an array of Control ID's of that items (_ArrayAdd( $handles,GUICtrlCreateTreeViewitem ($file,$treeview))) that's all Link to comment Share on other sites More sharing options...
/dev/null Posted July 12, 2006 Share Posted July 12, 2006 where $items is a number of items in a treeView, $handles is an array of Control ID's of that items (_ArrayAdd( $handles,GUICtrlCreateTreeViewitem ($file,$treeview)))that's all Ah, O.K. then take a look at the help file example for GUICtrlCreateTreeViewItem(). There you will find what you are looking for. Its the code after "Case $msg = $infobutton". CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
wodzuu Posted July 12, 2006 Author Share Posted July 12, 2006 Ah, O.K. then take a look at the help file example for GUICtrlCreateTreeViewItem(). There you will find what you are looking for. Its the code after "Case $msg = $infobutton". CheersKurtThanks for your reply but I cant find in that example code "Case $msg = $infobutton". That's strange. Maybe you have different help file ? Can you paste that example for me here ? Link to comment Share on other sites More sharing options...
/dev/null Posted July 12, 2006 Share Posted July 12, 2006 Thanks for your reply but I cant find in that example code "Case $msg = $infobutton". That's strange. Maybe you have different help file ? Can you paste that example for me here ? You are right. It's in the help file of the beta version. Maybe you should install the latest beta and play with the whole example, not just the few lines below. Case $msg = $infobutton $item = GUICtrlRead($treeview) ; Get the controlID of the current selected treeview item If $item = 0 Then MsgBox(64, "TreeView Demo", "No item currently selected") Else $advmsg = GUICtrlRead($item, 1) ; Get advanced infos about the treeview item If ($advmsg[0]== 0) Then MsgBox(16, "Error", "Error while retrieving infos about item") Else MsgBox(64, "TreeView Demo", "Current item selected is: " & $advmsg[0]) ; $advmsg[0] contains the text and $advmsg[1] the state value of the treeview item EndIf EndIf Cheers Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now