how to make only checked treenode could be clicked?
-
Hello,everyone! I have a treeview with checkboxes, I use "AfterCheck" event and "NodeMouseClick" event and now the treenode could change color and link to tabpages. What I question is , if a treenode didn't be checked, when I clicked the checkbox, the "NodeMouseClick" event also actived, one tabpage was selected;But I wanted that, when I clicked the checkbox, it just make the node be checked, I should clicked the node again to make tabpage display. What should I do with treeview's event?PLZ give me some suggestions! Thx!
-
Hello,everyone! I have a treeview with checkboxes, I use "AfterCheck" event and "NodeMouseClick" event and now the treenode could change color and link to tabpages. What I question is , if a treenode didn't be checked, when I clicked the checkbox, the "NodeMouseClick" event also actived, one tabpage was selected;But I wanted that, when I clicked the checkbox, it just make the node be checked, I should clicked the node again to make tabpage display. What should I do with treeview's event?PLZ give me some suggestions! Thx!
Why don't you put code in the start of the NodeMouseClick handler to check if the clicked node is checked or not?? Seems pretty simple to me...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Why don't you put code in the start of the NodeMouseClick handler to check if the clicked node is checked or not?? Seems pretty simple to me...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak