TreeView - OnPaint override? - Boolean to display certain nodes

  • Thread starter Thread starter sho_nuff
  • Start date Start date
S

sho_nuff

Hello,

It appears that i may need to create a custom treeview.

I have a set of nodes - sometimes, if a user selects an option , i may
want to only display a subset of those nodes... and i don't want to
have to create a new treeview every time. is it possible to just
override the paint method for a treeview to loop through my custom
nodes and check some display boolean before making the node visible to
my user?

is there an easier way to do this?

SN
 
Hello,

You could implement that behavior by adding/removing nodes dynamically. The
Nodes property returns you a NodeCollection which has methods like Add,
Remove, and so on.
This way, you won't have to override the paint method.
Hello,

It appears that i may need to create a custom treeview.

I have a set of nodes - sometimes, if a user selects an option , i may
want to only display a subset of those nodes... and i don't want to
have to create a new treeview every time. is it possible to just
override the paint method for a treeview to loop through my custom
nodes and check some display boolean before making the node visible to
my user?

is there an easier way to do this?

SN

Regards,
Adrian Vinca [MSFT], Developer Division
--------------------------------------------------------------------
This reply is provided "AS IS", without warranty (express or implied).

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
Back
Top