Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Traverse treeview bottom to top
Using Excel 2002.
Could anybody give me an example how to traverse a treeview from bottom to top? It has to start at a given node and it has to move through the treeview has it appears on the screen. In other words the order of the nodes is with increasing distance from the bottom of the application. I have a recursive function that moves top to bottom, but I can't figure out the other way round. Thanks for any assistance. RBS |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Traverse treeview bottom to top
Hi,
I think the answer is "with considerable difficulty". The problem is that when you pop up to the .Parent node, you then have to traverse back down the tree again to get the item immediately above the "target" item. Given that you've got it working from top to bottom (which does lend itself to effiicient recursion), why don't you use that code and just reverse the order when you've finished? Just a thought, Peter Beach "RB Smissaert" wrote in message ... Using Excel 2002. Could anybody give me an example how to traverse a treeview from bottom to top? It has to start at a given node and it has to move through the treeview has it appears on the screen. In other words the order of the nodes is with increasing distance from the bottom of the application. I have a recursive function that moves top to bottom, but I can't figure out the other way round. Thanks for any assistance. RBS |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Traverse treeview bottom to top
Good thought.
I could traverse down, store the nodes in an array and use that to go the other way. Will give that a go. RBS "Peter Beach" wrote in message ... Hi, I think the answer is "with considerable difficulty". The problem is that when you pop up to the .Parent node, you then have to traverse back down the tree again to get the item immediately above the "target" item. Given that you've got it working from top to bottom (which does lend itself to effiicient recursion), why don't you use that code and just reverse the order when you've finished? Just a thought, Peter Beach "RB Smissaert" wrote in message ... Using Excel 2002. Could anybody give me an example how to traverse a treeview from bottom to top? It has to start at a given node and it has to move through the treeview has it appears on the screen. In other words the order of the nodes is with increasing distance from the bottom of the application. I have a recursive function that moves top to bottom, but I can't figure out the other way round. Thanks for any assistance. RBS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
survey traverse computations | Excel Discussion (Misc queries) | |||
traverse data based on 2 conditions | Excel Discussion (Misc queries) | |||
TreeView in Excel VBA | Excel Discussion (Misc queries) | |||
TreeView Object | New Users to Excel | |||
Description of Listview and Treeview Controls | Excel Programming |