Check If Child In TreeView Is Selected

  • Thread starter Thread starter Philip Wagenaar
  • Start date Start date
P

Philip Wagenaar

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
..
 
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
 
Hi Eric,

LOL

"Nodeke" is that from Suske and Wiske?

There are a lot of Dutch speakers to day did you see?
 
Cor said:
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) ;)
 
Back
Top