[Gtk-sharp-list] popup menu (combobox?) for treeview?
samuraidanieru at gmail.com
Fri May 22 10:20:29 EDT 2009
Thanks Spoody and Michael, I've got my context menu popping up for a
right-click on the treeview!
Now I'm trying to figure out how to show specific menu items, depending on
what row the user right-clicked on. (otherwise it wouldn't be a context
menu, right;^) The problem I'm having is the Gtk main loop doesn't seem to
get around to handling the selection changed event until after it's finished
handling my popup event handler. The result of this is that my menu options
are one iteration behind what the user just selected. (e.g. When I right
click in sequence on row x, then row y, then row z, I'm given a context menu
for 'no' row, then x, then y, respectively). I'm verifying this by some
console.writelines: the selectionChanged is always getting executed after
the popup method executes.
So how to solve this? I've poked around on the mailing lists and someone
said that if up to date selection data is needed, then the
[GLib.ConnectBeforeAttribute] won't work, and instead I need to get the
position with x, y coordinate ...is this correct? How might one go about
View this message in context: http://www.nabble.com/popup-menu-%28combobox-%29-for-treeview--tp23660946p23671351.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
More information about the Gtk-sharp-list