J3anyus Posted April 15, 2009 Share Posted April 15, 2009 Hey everyone, I'm trying to figure out if it's possible to grey out checkboxes that are in a treeview. I know the $GUI_DISABLE flag is generally used to grey out checkboxes, but that doesn't seem to work in a treeview, or else I'm doing something wrong. Here's non-treeview code that works fine for greying out boxes zero and one: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $checkbox[3] $gui = GUICreate("GUI", 650, 450, 200, 150) $checkbox[0] = GUICtrlCreateCheckbox("zero", 100, 100, 100, 25) $checkbox[1] = GUICtrlCreateCheckbox("one", 100, 150, 100, 25) $checkbox[2] = GUICtrlCreateCheckbox("two", 100, 200, 100, 25) GUISetState() GUICtrlSetState($checkbox[0],$GUI_DISABLE) GUICtrlSetState($checkbox[1],$GUI_DISABLE) While 1 $guiMsg = GUIGetMsg() WEnd And here's code that's nearly identical, but uses a treeview and doesn't grey out the boxes: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <TreeViewConstants.au3> Global $checkbox[3] $gui = GUICreate("GUI", 650, 450, 200, 150) $treeviewStyle = BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_CHECKBOXES) $treeview = GUICtrlCreateTreeView(20, 20, 400, 300, $treeviewStyle) $checkbox[0] = GUICtrlCreateTreeViewItem("zero", $treeview) $checkbox[1] = GUICtrlCreateTreeViewItem("one", $treeview) $checkbox[2] = GUICtrlCreateTreeViewItem("two", $treeview) GUISetState() GUICtrlSetState($checkbox[0],$GUI_DISABLE) GUICtrlSetState($checkbox[1],$GUI_DISABLE) While 1 $guiMsg = GUIGetMsg() WEnd Any suggestions for what I might be doing wrong or how to fix this? Thanks so much! Link to comment Share on other sites More sharing options...
rover Posted April 16, 2009 Share Posted April 16, 2009 Hey everyone,I'm trying to figure out if it's possible to grey out checkboxes that are in a treeview. I know the $GUI_DISABLE flag is generally used to grey out checkboxes, but that doesn't seem to work in a treeview, or else I'm doing something wrong.treeview checkboxes are internal imagelist bitmapshave a look at Holgers codeTriState/ThreeState GUI TreeView - Holgerhttp://www.autoitscript.com/forum/index.php?showtopic=28464some additional linkshttp://www.google.ca/search?hl=en&q=tr...earch&meta=http://groups.google.com/groups?as_q=treev...06&safe=off I see fascists... 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