469,950 Members | 1,914 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

TreeView - OnPaint override? - Boolean to display certain nodes

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
Nov 15 '05 #1
1 3505
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.

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by garyusenet | last post: by
2 posts views Thread by Stuart | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.