Re: GtkTreeView: How do I detect right-click?
- From: Ang Bodhi <angbodhi pacific net sg>
- To: Guy Rouillier <guyr-ml1 burntmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GtkTreeView: How do I detect right-click?
- Date: Mon, 10 Apr 2006 22:51:27 +0800
Hi,
Guy Rouillier wrote:
Ang Bodhi wrote:
Hi,
I have a GtkTreeView widget that I would like to detect the mouse
button right-click, how can I do that? In Gtk 1.2, I used to be able
to connect to a button_press_event signal of a GtkTreeItem widget.
Did you search archives before posting? I just answered this 5 days ago:
Sorry, I did a quick search with bad choice of keywords.
gtk_menu_new();
gtk_menu_popup();
In order to know to kick this off, you'll have to gtk_signal_connect
on the "popup_menu" signal.
Thanks, I didn't realize there's a "popup_menu" signal. After trying it,
I find
that the signal "popup_menu" does not work with the GtkTreeView widget.
I notice the tests/testiconview program use the popup_menu signal
on GtkIconView widget as well, but its popup menu works only by
connecting to the button_press_event signal of GtkIconView widget.
If I comment out the button_press_event signal connection, the program
would fail to popup the menu. It actually rely on the event's position to
determine which icon is chosen.
Regards,
Bodhi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]