this-is-me Posted October 12, 2004 Posted October 12, 2004 (edited) I haven't tried on anything other than XP, but this is an example from holger: expandcollapse popup#include <guiconstants.au3> Opt("GuiOnEventMode", 0) GUICreate("GUI with a treeview",340,200,-1,-1,BitOr($WS_MINIMIZEBOX,$WS_MAXIMIZEBOX,$WS_GROUP,$WS_CAPTION,$WS_POPUP,$WS_SYSMENU)) $maintree = GUICtrlCreateTreeview(10,10,170,150) GUICtrlSetImage(-1,"shell32.dll",3,4); icon for default nonselected state GUICtrlSetImage(-1,"shell32.dll",4,2); icon for default selected state $aboutitem = GUICtrlCreateTreeviewitem("About",$maintree) GUICtrlSetImage($aboutitem,"shell32.dll",23) $generalitem = GUICtrlCreateTreeviewitem("General",$maintree) GUICtrlSetImage(-1,"shell32.dll",15) $toolsitem = GUICtrlCreateTreeviewitem("Tools",$maintree) GUICtrlSetImage(-1,"shell32.dll",21) $effectitem = GUICtrlCreateTreeviewitem("Effects",$generalitem) $styleitem = GUICtrlCreateTreeviewitem("Styles",$generalitem) GUICtrlSetImage(-1,"shell32.dll",24,2) GUICtrlSetImage(-1,"shell32.dll",25,4) $cmditem = GUICtrlCreateTreeviewitem("Commandline",$toolsitem) $miscitem = GUICtrlCreateTreeviewitem("Misc",$toolsitem) GUISetState(@SW_SHOW) GUICtrlSetState($generalitem,$GUI_EXPAND) While 1 $msg = GUIGetMsg() Select Case $msg = -3 ExitLoop Case $msg = $miscitem GUICtrlSetImage($maintree,"shell32.dlls",9,2) GUICtrlSetImage($maintree,"shell32.dlls",10,4) EndSelect WEnd GUIDelete() Exit This should expand the general item and show the subitems, but it does not. Edited October 12, 2004 by this-is-me Who else would I be?
CyberSlug Posted October 12, 2004 Posted October 12, 2004 This also fails on Windows XP: $TVM_EXPAND=0x1102 $TVE_EXPAND=0x2 $x = GUISendMsg($maintree, $TVM_EXPAND, $TVE_EXPAND, $generalitem) I think I got the parameters right... Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
this-is-me Posted October 12, 2004 Author Posted October 12, 2004 (edited) Hmmm... Has it ever worked? I only tried recently. EDIT: Does it work using sendmessage with dllcall? Edited October 12, 2004 by this-is-me Who else would I be?
Holger Posted October 12, 2004 Posted October 12, 2004 (edited) Yeah, it did work...I check out now where the problem is...Edit: found a problem in the CtrlSetState-function.Send the bugfixing to Jon and JP (cc).@this-is-me / CyberSlug: Thanks for information Regards Holger Edited October 12, 2004 by Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
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