Do I use the Owner
, OwnerItem
, or the Container
property?
What if the ToolStripMenuItem
is a member of another tsmi, which in turn is a member of another tsmi, etc.?
The purpose of this is to be able to add an event handler that gets at the TreeView
that has the ContextMenuStrip
that has that ToolStripMenuItem
.
Abstracting a bit, is there a general way to get at the owners of controls, until you reach the one you're interested in? Just cast and hope?