2 TreeView Issues
-
I'm kinda new to C#. I'm trying to make a program with a TreeView. My program creates 2 nodes when the program loads and all data appears as children to those two nodes. I also have a context menu that is set to change depending on the type of selection made. The first issue is when the program starts, the first node is selected and it's context menu comes up automatically. How can I stop that? I tried to see if I could make an exception but nothing worked out. The second is when I use the ContextMenu Show() function, I give it an ordered pair location to anchor the top-left corner. I tried to use various things inside the control to give a position of the mouse but the context menu always appears at 8,8 from the corner of the tree view. How can I figure out what coordinates the mouse was at when it clicked on the item? Thanks in advance.