I
I
Ilya2012-10-04 11:04:32
.NET
Ilya, 2012-10-04 11:04:32

How to do linked folder navigation in TreeView and ListView

I'm learning C# and decided to write a simple file manager using TreeView and ListView. How to make it so that when you navigate through the ListView folders, they are also displayed in the TreeView. That is, a tree and child "nodes" were also created up to the selected folder.
I'll attach the source - Link .
Oh yes, and immediately another question, if you can, then how to make the Address bar of the file manager when you type the path to show the possible options for folders and files.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Zagrebelin, 2012-10-04
@Zagrebelion

I won't tell you about updating the lists, but if you introduce the extension variable into IndexIcon, then you will get rid of 93 string.EndsWith("") calls. And if you insert ToLower() somewhere, then you don’t have to compare with “rar” and “RAR”, which is twice as fast.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question