I have gotten the Demo version of the VCL Edits to check out the
TAdvCheckTreeView. And I had come across what might be a problem with
it.
When I create a test application that uses the AdvCheckTreeView it is not working as I would expect it to.
What I need it to do is have a tree node hierarchy of the following:
All
|
|---------- Child 1
| |
| |------------ Sub-Child 1A
|
|---------- Child 2
| |
| |------------ Sub-Child 2A
|
|---------- Child 3
| |
| |------------ Sub-Child 3A
I am able to create this in the Tree Editor and programmatically.
Here is what I would expect to happen here.
1. If I Check/Select Child 1 then Sub-Child 1 is also checked/selected.
2. If I Check/Select All then Child 1, Child 2, and Child 3 are selected along with all of their Sub-Children.
3
That if a parent node is checked, no matter where it is in the
hierarchy. then all the Child Nodes, sub-child nodes, sub-sub-child
nodes (and so on) should also be checked.
But, the second and
third are not happening. With the above hierarchy, If I check/select All
then Child 1, Child 2, and Child 3 are checked/selected. Leaving the
sub-children, Sub-Child 1A, Sub-Child 2A, Sub-Child 3A, un-checked.
Is this by design? Or is it a bug.
To test this. Create a new VCL application, Drop a TAdvCheckTreeView on the frame. Then Edit the following properties:
CheckBoxes = True
CheckHierarchy
chCheckParent = True
chCheckChilds = True
MultiSelect = True
MultiSelectStyle
msControlSelect = False
Using the Tree Items Editor create the above tree node hierarchy.
Run the application, expand all the nodes. Then check the Child 1 Node, then uncheck the Child 1 Node. Now Check the All Node.
Thanks for reporting. We traced & solved this issue. The next update will address this.
I too have the same problem described by Hagin. I'm using version 1.0.1.3 from October 2017, so shouldn't this have been fixed by now? Or is there anything else that needs to be done (setting a flag, property, etc) to have the children of a node select/unselect properly?
In the latest release, there are no more known issues regarding this check problem.