I am writing a programme which catalogues DVD/CD data disks so that the user can search for archived files and know which DVD/CD they are on. To do this I read the directory structure and store it in a Treeview in traditional Windows Explorer style - setting the icon value for each node according to whether it's a drive, directory or file.
I would like to be able to read the icon value of a Treeview node in order to:
1) know when to toggle an icon between an open-folder and closed-folder using ModifyTreeViewNode when the user double clicks a folder
2) save each node's icon value when writing the Treeview node structure to the database [I currently do this by keeping track of each node's icon in a separate array, but this is not very elegant as the info I want is already stored within the Treeview structure - and I am therefore duplicating data]
I have been unable to find a way to retrieve the icon value of a Treeview node. Can anyone please tell me whether this is possible?
I would like to be able to read the icon value of a Treeview node in order to:
1) know when to toggle an icon between an open-folder and closed-folder using ModifyTreeViewNode when the user double clicks a folder
2) save each node's icon value when writing the Treeview node structure to the database [I currently do this by keeping track of each node's icon in a separate array, but this is not very elegant as the info I want is already stored within the Treeview structure - and I am therefore duplicating data]
I have been unable to find a way to retrieve the icon value of a Treeview node. Can anyone please tell me whether this is possible?