button_press events for GtkTreeView



I'm writing an application where the user needs to click on items in a
GtkTreeView. I need some special information to popup about the selected
item in the list *ONLY* while they're holding the mouse button down.
However, I can't figure out which signal to connect to so that I get a
callback when they click on an item.

Here's what I've tried so far:

button_press_event (of the GtkTreeView widget) - the list doesn't seem to
have registered the new selection by this point.

changed (of the GtkTreeSelection widget) - this works except when the user
clicks again on an already selected item. For example, this works great if
the user has clicked on "Option 1" when "Option 2" was previously
selected, but if the user clicks "Option 1" again, I don't get an event
for that (because the selection really hasn't changed). I can't unselect
items when they let the mouse go (for various reasons).

Any suggestions? Thanks in advance.

Ryan

p.s. I'm not yet subscribed to this list so please "CC" me if you reply.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]