By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,784 Members | 3,274 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,784 IT Pros & Developers. It's quick & easy.

TreeView - OnPaint override? - Boolean to display certain nodes

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.