Problem in directory operation in TreeView

S

Steven

Hello,

I have a problem in using TreeView.
I have made a dialog with TreeView. When I open this dialog , the Drives
in the computer could be show in this TreeView.This time, I click the node
of directory and get into the directory of "my Directory", then , I close
the
dialog.
Next time, when I open the dialog again, I hope the directory that
I have accessed before could be opened automatically. Just like this:
(I mean default, need not to click the node)

|-C:\
|-D:\
| |--Peter
| |--Working
| |--ABC
| |---my Directory
|-E:\
|-F:\


I have tried to use "path.Expand()", but it seems no good working.
Does anyone can give me any advise or show me somecode for sample?.

Thanks.

bestRegards from
Steven Suen
 
N

Nicholas Paldino [.NET/C# MVP]

Steven,

It sems that you need to know what you want to expand. When the dialog
closes, you will have to store the path somewhere and then expand that when
you optn it again.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top