Reputation: 1
I'd like to open a window by clicking somewhere - mostly outside any node - in a treeview to open a new window (this is to maintain a bill of material shown in that tree view, I call it "formBOM").
As .Click(), .MouseClick() and .NodeMouseClick() only works when clicking a node, I use MouseDown event.
With this I can easily open the required form by calling e.g. formBOM.Show(), of course.. but that window does not get focus, because mousedown takes back focus to original form. Tried formBOM.Setfocus(), bringtofront() etc.. but as mousedown will take back focus later, it doesn't work.
I assume this is not only related to Treeviews, but here I have the problem. Using a button does work, but I would like to offer a click into the whole treeview control to the user.
Upvotes: 0
Views: 43