TreeView Question

Aug 28 2006 6:03 PM
A couple of weeks ago I was asked to make a program that iterates through a network directory and finds files that were created and/or modified that are X days old, where X is set by the user. The best I could figure, I needed a TreeView for the folders and a CheckedListBox for the files. While this sort of works, it doesn't quite cut it. A friend of mine noticed that when you close a node, and reopen it, the files you previously had checked are no longer checked, this poses a problem since the checked files are to be set by the user, and auto checked based on the file age, then compressed and moved to another location. Obviously, the reason for this is that the treeview and the listbox are not linked in any way. Is there an easy way to link what is checked to the selected node or would it be better to just show all levels in the treeview? Both have their advantages and disadvantages. If adding all levels to the treeview is the best, how would I go about getting the files added to the node? I have only been able to view the lowest level folder with no files. Just so you know, I am doing this with C# 2.0, sorry for not mentioning this earlier. Your help is greatly appreciated.

Answers (1)