|
Populate on demand tree control help
Ive got a tree control and I am trying to add stuff to it only when the directories are expanded. So I catch TVN_EXPANDING, in OnItemExpanding() i call scanDir (which then inserts items) the problem is I need to pass in the path of the item just expanded as the root for scanDir to add its subdirectories to the tree control. This sounds confusing so let me try to clarify it with some code (I know this probably isnt the best way of doing all of this- any tips are welcome)
However because the root is still c:\ it just finds all the directories in C:\ not the directories in the subdirectory i am trying to expand. In OnItemExpanding I need to SetCurrentDirectory to the directory the user has just clicked on (e.g. if the user expands c:\program files, i need to set the current directory as c:\program files)
Im sorry this post is so long but this problem is driving me crazy.
If anyone can help i would be really really greatfull
Edited by - Zeke on May 16, 2001 10:10:54 AM
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement