Reputation: 34632
I have been looking for a C# tree control for displaying a file system that has the following capabilities:
I have been looking at this C# File Browser. Unfortunately, I have not been able to figure out how to do meet my second need. (If anybody can clear that up for me, I would like that even better.) Thanks for any help.
Upvotes: 2
Views: 2367
Reputation: 8558
Hi I've looked at the C# File Browser and Find a way to handle your 2nd requirement. You could try adding ItemActivate event on the fileView control (under Browser User Control of the FileBrowser project) and get the selected item(s) when handling it. ItemActivate event is triggered on every double click of an item. Here is the sample code:
private void fileView_ItemActivate(object sender, EventArgs e)
{
//Loop thru all selected items
foreach (ListViewItem item in ((BrowserListView)sender).SelectedItems)
{
//Do your stuuf here. MessageBox is only used for demo
MessageBox.Show(item.Text);
}
}
Edit by Original Question Writer: To see all of the source, look at the code posted by cipriansteclaru in the comments section of the FileBrowser. You have to actually edit the FileBrowser source to gain this functionality (which is what this answer was demonstrating).
Upvotes: 2