After populating a treeview and expandall() in form load event, the plus (+) sign on the left-side of the node doesn’t change to minus (-) sign. (See image # 1.)
However, if I just populate the treeview (see image # 2) and then use the “Expand All” button, plus (+) sign is changed to minus (1) sign after expanding (see image # 3) which I believe is the correct behaviour.
If I click on “Collapse All” button, the treeview becomes totally invisible including the root node (image # 4).
I also noted that ShowLines property is not available. Is it by design?
Using Build 126.96.36.199
You shouldn’t have to redo the theme. The json files are easy to merge with tools like WinMerge. In this case the change is limited to the tree item appearance. The indent value is the same as the tree file and it has a new left padding value.
Yes. The theme file I’ve been playing with is the culprit.
The changes you made on the theme are not in the custom theme yet. I can still recall, at one point, you also made changes to the themes and I had to restart all over again in creating a custom theme. If case like that, is there an easy way I can include into my custom theme changes like these without starting over again based on revised theme?
And based on the images shown above, they look OK now.
The indentation issue was fixed in the themes. Maybe you are using a custom theme? It was a missing padding and the indent was too large on tree items. The tree nodes are themed with two different appearances, one for tree folders (with children) and one for tree items.
I tried your sample to make sure, see my screenshot:
ExpandAll & CollapseAll seem to be OK now but it looks treenodes without children are still not indented correctly (WJ-7411). This may be due to +/- sign when a node has a child. And also, please consider if treeview.CheckBoxes is set to true.