Re: How do I catch right-click on a TreeView header?
- From: Sujith <m sujith gmail com>
- To: John M Collins <jmc xisl com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How do I catch right-click on a TreeView header?
- Date: Sun, 1 Jun 2008 08:20:30 +0530
John M Collins wrote:
I gave that a try, gtk_tree_view_column_get_widget() returns NULL unless
you've set a widget.
I've now got it displaying label widgets but alas the connection of
button-press-event doesn't seem to do anything. I still get the sorting
action on the left button of the mouse but nothing happens when I
right-click and it doesn't enter my event-handling routine.
Ideas would be valued. Thanks.
I did something like this.
GtkWidget *col_button = gtk_widget_get_ancestor(label, GTK_TYPE_BUTTON);
In the handler, you can check for button 3 and popup a menu.
But this might break if the internal implementation of GtkTreeView header changes.
It works for now.
[Date Prev][Date Next
] [Thread Prev][Thread Next