Jump to content

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

Problem:

got a treeview with checkboxes

the user clicks a checkbox -> checkbox changes state automatically

Question:

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

Sundance

Edited by Sundance
Link to comment
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
EndIf

of course you could combine that into all one line

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...