I'm writing (in C# on VS17) a Windows Forms App with a TreeView — that part is working OK — but I need a MenuStrip to appear beside each node if I click it. I plan on four menuitems: Add Child, Add Sibling, Edit Text and Edit Font.
Problem is, the MenuStrip is on the Form, not on the TreeView, so it is hidden.
I started with a ListBox, which worked fine, except when I selected an item, the TreeNode DE-selected, so was removed from access for the subsequent code. So I went online and watched a video about this procedure and suddenly realized the coder was placing the MenuStrip on the Form. (at this point I'm in Design Mode) so I grabbed the TreeView with the mouse and dragged it over — there was the MenuStrip, out of reach by the User.
I did one of these in the early 2000's on Borland C++. I don't remember having that problem.
Any suggestions?
Got it! A ContextMenuStrip solves the problem that a MenuStrip can't.