[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Clicking on a GtkCellRendererPixbuf
- From: Tim Müller <zen18864 zen co uk>
- To: Calum Grant <calumg onetel com>, gtk-app-devel-list gnome org
- Subject: Re: Clicking on a GtkCellRendererPixbuf
- Date: Fri, 5 Dec 2003 11:02:49 +0000
On Friday 05 December 2003 09:55, Calum Grant wrote:
> I have a GtkTreeView, which contains several GtkCellRendererToggle
> columns. I'd like to replace them with a GtkCellRendererPixbuf column,
> with three possible states.
>
> I can change the pixbuf in the column no problems. But I'd like the
> column to respond to mouse clicks, like a GtkCellRendererToggle. How do
> I intercept mouse clicks to this column?
connect to the "button-press-event" signal on the treeview, and then use
gtk_tree_view_get_path_at_pos(view,
(gint) buttonevent->x,
(gint) buttonevent->y,
&path, &column, NULL, NULL)
or something like that to determine the path and tree view column.
If you have multiple cell renderers packed into that column, things get a bit
more tricky though.
Alternatively, you could write your own cell renderer I suppose :-)
Cheers
-Tim
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]