Hi,
Adding nodes to a TreeView programatically ...
1) Instantiate a TreeNode object and set its SelectAction to
TreeNodeSelectA ction.Expand.
2) Instantiate another TreeNode object and add it to the first TreeNode's
ChildNodes collection.
3) Add the first TreeNode to a TreeView's Nodes collection.
Now, when the user clicks the first TreeNode, it expands or contracts its
child nodes as expected, just as if the user had clicked the little square
box to the left of the node in question.
However, now your client tells you that he doesn't like the little square
boxes with the plus and minus signs, so you set the TreeView's
ShowExpandColla pse property to false. This, of course, removes the little
boxes but in doing so also removes the ability to expand those nodes with
child nodes - is this "normal" behaviour...?
If so, is the accepted workaround to set ShowExpandColla pse to true and to
set the TreeView's CollapseImageUR L and ExpandImageURL to a transparent gif
with a size of 1px x 1px?
Any assistance gratefully received.
Mark