By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,173 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,173 IT Pros & Developers. It's quick & easy.

Problem in directory operation in TreeView

P: n/a
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
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Steven" <li****@newtouch.com.cn> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.