TreeControl expand button always present

  • Thread starter Thread starter David Stone
  • Start date Start date
D

David Stone

Hi,

I would like to fill in a tree control on demand, so I
would like to + sign to appear even if there are no child
nodes. In C++ I would just set the window style, but I'm
not even sure how to do that in C#.

Thanks.
 
I would like to fill in a tree control on demand, so I
would like to + sign to appear even if there are no child
nodes. In C++ I would just set the window style, but I'm
not even sure how to do that in C#.

this is really simple. just add a dummy node to each node that you'd like to
expand on demand. then, when you catch NodeExpand event, you just check if
there's only one node (the dummy node) and if so, you delete it and add
valid child nodes.
 
Back
Top