473,606 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3679
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1585
by: Eddie Smit | last post by:
Hi all, IS IT POSSIBLE to display certain nodes WITHOUT a checkbox (because this 'option' is not available for the user?) Another possibility maybe is to display the text grey en make this checkbox 'non clickable' but I don't know if that is possible. Regards, thanks in advance Eddie Smit Holland.
0
1314
by: rao | last post by:
I am trying to get sub nodes for for clicked node using getChildren() method as shown below. I am getting javascript exception error (subtree.null )when nodes are not expanded. The code works only when nodes are expanded. any help is greatly appreciated. I am getting this error while accessing the property currentChild.getAttribute("Text"). Thanks rao
2
22018
by: Jack | last post by:
Hello, I am trying use a TreeView with checkboxes. I would like to check more than one node and allow all child nodes of selected nodes to be checked or unchecked with the parent is checked. Thanks in advance for any help, Jack
1
2716
by: garyusenet | last post by:
Hi All, I'm eagerly anticipating what you have to say on something that's stumped me over the weekend. I'm writing a small application which utilises a treeview control. I've figured out how to programatically add nodes to it, but everytime the program is exited the treeview control resets itself. I looked for a save method or something similair but there doesn't seem to be one. I have found the copyto method, and figured out how to...
2
3648
by: Stuart | last post by:
Hi, For design reasons I need treeview control to display right-to-left, i.e, with its parent nodes to the right and the child nodes indented to the left, however I cannot find a suitable property to change. Is this possible please, and if so, how? TIA
0
313
by: fishware | last post by:
I've got a treeview created by TreeNode node = treeView1.Nodes.Add("one"); node.Nodes.Add("three"); looks like: one -three
2
1878
by: npm | last post by:
I'm trying to display XML nodes whose parent node has a certain attribute (or attribute value). I have one code that works in Firefox, but not IE and another code that works in IE, but not Firefox. This one works in FF, but not IE: <script type="text/javascript"> xmlDoc=loadXMLDoc("sampleFileZ.xml"); x=xmlDoc.getElementsByTagName("sampleNode"); for (i=0;i<x.length;i++) { if (x.parentNode.hasAttribute("sampleAtt"))
1
1794
by: Sasi Kumar | last post by:
I have a xml file. I want to display the nodes and childnodes in my datagrid, i used xmldatasource, but i can read a specific path only. The problem is i should not use dataset and xmldocument. Give me some suggestions <?xml version="1.0" encoding="utf-8"?> <newbookingrs> <bookingid>187250</bookingid> <bookingstatus>We have received your request. As you did not submit the required payment details, no booking will be held for you. If...
0
2393
by: devidevi | last post by:
hello sir, i'm doing a project in Mobile Adhoc network in ns2 simulator i have to perform routing with AODV.. my problem is i have to disable certain nodes ( in a 20 node topology) from performing the routing operation....only some mentioned nodes have to perform routing.....is it possible to disable some nodes ????
0
7951
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5966
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2448
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1553
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.