I'm trying to use TreeListView, and i saw this post: How to create a MultiColumn treeview like this in C# Winforms app?. But i don't understand how handle event when i click on tree node. Could you help me?
i've tried to add event like this to form:
private void treeListView_Click(object sender, EventArgs e){
Debug.Print("HI");
}
but it doesn't works.
Thanks to @Robert Harvey answer, i added
treeListView.CellClick += treeListView_CellClick; into FillTree method, where
private void treeListView_CellClick(object sender, BrightIdeasSoftware.CellClickEventArgs e)
{
Debug.Print("hi");
}
That post uses the ObjectListView library. If you download the source code for that library, open it in Visual Studio and examine Events.cs, you'll find this, in the partial class for TreeListView:
There's also a bunch of events defined in that file for the
ObjectListView
class itself, including this one: