473,320 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Check If Child In TreeView Is Selected

How can I check if any child of a node is selected. If the
node itself is selected I want false, if any other node or
it's child's are selected I want false, but if any child
of a specific node is selected I want true returned
..
Nov 20 '05 #1
3 3257
code not tested but it should get you started

where you call it
dim blnControle as boolean = false

blncontrole = testnodes(nodeyouaretesting)
private function testNodes(parentnodeke as treenode) as boolean
dim nodeke as treenode
dim blnC as boolean = false
for each nodeke in parentnodeke.nodes
if nodeke.selected or testnodes(nodeke) then
return true
end if
next
return false
end sub

hope it helps

eric

"Philip Wagenaar" <p.********@accon.nl> wrote in message
news:08****************************@phx.gbl...
How can I check if any child of a node is selected. If the
node itself is selected I want false, if any other node or
it's child's are selected I want false, but if any child
of a specific node is selected I want true returned
.

Nov 20 '05 #2
Cor
Hi Eric,

LOL

"Nodeke" is that from Suske and Wiske?

There are a lot of Dutch speakers to day did you see?
private function testNodes(parentnodeke as treenode) as boolean
dim nodeke as treenode
dim blnC as boolean = false
for each nodeke in parentnodeke.nodes
if nodeke.selected or testnodes(nodeke) then
return true
end if
next
return false
end sub

Nov 20 '05 #3
"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi Eric,

LOL

"Nodeke" is that from Suske and Wiske?

There are a lot of Dutch speakers to day did you see?


usually i don't pay mutch attention to that kind of thing :)

and nodeke is just a small node ;p (although i have almost all suske & wiske
strips at home (missing a few below nr30) ;)
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rasmus | last post by:
I need to grab focus to a specific node i my treeview when I click on my listbox. Here's the code that differs between the different event i the listBox: private void...
2
by: Claus | last post by:
Hello, I have a long treeview with scrollbars. When I scroll down and press a treeview node, then the Load event fires and navigate in an iframe to another page. The problem is, that afterwards...
8
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the...
5
WebDunce
by: WebDunce | last post by:
Hi guys, I am trying to develop a simple xml editor. I have an object that has a TreeView. I use the TreeView to display the Xml node info. That's all fine, but i want the user to be able to move...
2
by: Bob | last post by:
Hi, I would to have a tree view control with check boxes in which the parent and child nodes interacts, in the way that you normally see this occuring. Checking the parent node automatically...
6
by: dav61000 | last post by:
I have a parent form that uses a Treeview Control and I would like to pass the node selected to a child form where the user will add update or delete the record selected using a dataset. Is there a...
0
by: divya1949 | last post by:
Create a windows c# application which will Read a xml file and populate nodes in the treeview. 1 On selection of treenode display the child nodes of that node in listview control 2. ...
2
by: =?Utf-8?B?bWFib25k?= | last post by:
I'm using a treeview control. One parent node, several child nodes, several grandchild nodes. Each of the nodes has a checkbox. My question, when the user changes the check value of one of the...
1
by: =?Utf-8?B?Rmx5Z3V5?= | last post by:
I have a TreeView with so many nodes that it requires scroll bars. When the user selects a node the screen is refreshed and the selected node is no longer visible. The TreeView is opened to the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.