Treeviews and popups, and easy way?
Hi
I'm using monodevelop, and I have a treeview that needs to support multiple selections, and a popup menu.
I dont really want to make my own custom treeview and override OnButtonPress if I can avoid it, as I use monodevelop and it'd be a lot cleaner for me to keep the ui in the ui designer.
I've tried a few different solutions to work around this problem, mostly [ConnectBefore] on my OnTreeviewButtonPress, and then a function that's called immediatly to update the selected treeview based on ButtonPressEventArgs, but this seems awfully hackish, and isn't reliable (and since I switched to MultipleSelect, not really working at all).
Does anyone have any similar functions? Preferably something that works, I just want to be able to get the currently selected rows from my OnTreeviewButtonPressEvent.
Is there any clean way of implementing a popup menu in a treeview when you need to know the selection? I've googled for hours now, and everything I find is a ton of fairly hackish code.
Anders Aagaard