alan

alan

  • NA
  • 5
  • 0

How To Get Control Events in Custom Control Back To Parent Form

Oct 21 2010 10:30 AM

This was easy in VC++ I could use GetParent() and then SendMessage(). I have no idea how to do this in c# and have searched all over.
I have a Form1.cs project
I have a TreeViewCustomControl project
I have a treeview1 control on the user control panel.
I can get the treeview1 doubleclick events in the custom control class fine but don't know how to let the form know which node (text) was double clicked.
I can also get doubleclick events for custom control in form1 class but this doesn't help me either because this lies under the treeview1.
How to get text of treeview1 nodes which are doubleclicked inside the form1.cs?

Answers (1)