Jump to content
Sign in to follow this  

TreeView with Checkboxes - which one clicked ?

Recommended Posts

Hi hi together,

after two days of searching and trying to solve the prob on my own, the forum is my last help.

I have the feeling that the solution is just a 'one' - liner :"> but we will see...


got a treeview with checkboxes

the user clicks a checkbox -> checkbox changes state automatically


How can i get the ID of the checkbox which changed the state? (I need to modify the parent checkbox)

I don't want to enumerate the boxes when creating them because there will a few hundred of them.

What i can get with GUICtrlRead is the ID of the selected TreeViewItem but how can i get the state of

the corresponding checkbox ?

greets and thx in advance


Edited by Sundance

Share this post

Link to post
Share on other sites

The following I believe is what your looking for

$state = GuiCtrlRead(GuiCtrlRead($treeview))
oÝ÷ ÚØ^*.ßÙe«Þ¶¬x­wm¡È^rKazËZµçè­ìZ^jëh×6
If BitAnd($state,$GUI_CHECKED) = $GUI_CHECKED Then
  ; do what you need to do

of course you could combine that into all one line


SciTE for AutoItDirections for Submitting Standard UDFs


Don't argue with an idiot; people watching may not be able to tell the difference.


Share this post

Link to post
Share on other sites

works like a charme.

i knew the $GUI_CHECKED thing but the GUICTRLRead(GUICtrlRead()) was new for me !

thx gafrost :)

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...