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.

John Collins Xi Software Ltd www.xisl.com

On Thu, 2008-05-29 at 09:51 -0700, Micah Carrick wrote:

> You may be able to use gtk_tree_view_column_get_widget() since *I think* 
> it's a GtkLabel (if not, you can make it so using set_widget()) and then 
> connect to the button-press-event of that widget.
> 
> - Micah Carrick
> 
>   Developer - http://www.micahcarrick.com
>   GTK+ Forums - http://www.gtkforums.com
> 
> 
> 
> John M Collins wrote:
> > Is there any way I can detect a right-click on a TreeView header?
> >
> > I have a sorted tree view and left click is sorting the rows according
> > to the header just fine. "clicked" only applies to left clicks and I
> > don't want to invoke what I want to be the right-click function every
> > time I change the sort criterion.
> >
> > "button-press-event" only seems to happen for the main body of the
> > TreeView not the header.
> >
> > Any advice would be appreciated.
> >
> > John Collins Xi Software Ltd www.xisl.com
> >
> >
> > _______________________________________________
> > gtk-app-devel-list mailing list
> > gtk-app-devel-list@gnome.org
> > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> >
> >   




_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to