Click here to Skip to main content
16,004,678 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi i know from my question it's easy to understand that i want to show my PC's directory list and storage with icons, but if you look at this link image on below

drive.google.com/file/d/12x6aSXnstwySCz0Oryw03ij-d6xNOQoA/view


this was from a vb 6.0 application and on the image it shows what folder is open and closed i still not encountered this kind of UI but if you know how can i done this using c# kindly enlighten me.

What I have tried:

for now im still still searching in google on how can i replicate this using c#
Posted
Updated 10-Mar-21 20:15pm
Comments
Maciej Los 11-Mar-21 2:12am    
What have you tried tiil now?

1 solution

Start with a TreeView[^] and an ImageList[^]. The Imagelist contains the icons for the "open" and "closed" folders and you assign the value to the node as it's branch opens and closes using the TreeView.BeforeExpand Event (System.Windows.Forms) | Microsoft Docs[^] and TreeView.BeforeCollapse Event (System.Windows.Forms) | Microsoft Docs[^]
Give it a try, it sounds more complicated that it actually is!
 
Share this answer
 
Comments
Maciej Los 11-Mar-21 3:35am    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900