Reputation: 1287
I want to make my gtk.CellRendererPixbuf
in the treeview clickable so that I can call a function when user clicks on it. Is this possible and how can this be done?
I'm working with PyGTK, but answers in C or PHP or anything else would be acceptable. Thanks.
Upvotes: 3
Views: 980
Reputation: 11454
The C documentation of GtkCellRenderer states that:
Beyond merely rendering a cell, cell renderers can optionally provide active user interface elements. A cell renderer can be activatable like GtkCellRendererToggle, which toggles when it gets activated by a mouse click, or it can be editable like GtkCellRendererText, which allows the user to edit the text using a GtkEntry. To make a cell renderer activatable or editable, you have to implement the activate or start_editing virtual functions, respectively.
What is unfortunate is that this information is missing from the pyGTK documentation, but the information is available in the activate
signal documentation.
Upvotes: 2