Jump to content
Sign in to follow this  

Getting state of treeview checkboxes

Recommended Posts

I made a treeview that has the $TVS_CHECKBOXES style, so that all of the items have a checkbox by them.

However, I can't get the state of the checkbox.

Global $window[101], $number=0
$WindowList = WinList()
For $i = 1 to $WindowList[0][0]
    If $WindowList[$i][0] <> "" And $WindowList[$i][0] <> "Program Manager" AND IsVisible($WindowList[$i][1]) Then
        $number = $number + 1
        $Window[$number] = GUICtrlCreateTreeViewItem($WindowList[$i][0],$WindowView) ; $windowview is my treeview
For $test = 1 to $number

GuiCtrlGetState gave me an 80 for all controls regardless of whether they were checked or not

GuiCtrlRead returned a 4 if its unchecked, a 257 if its the only one that is checked or the last one to be checked, a 260 if it is unchecked after being checked once,and a 1 if it is checked but other were checked after it.

Isn't there an easier way to do this using 2 or 3 numbers?

Edited by Paulie

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...