Hello,
I've spent the last hours trying to make a toggle cell renderer activatable, but I still have no idea how to do this correct or why my solution doesn't work.
I just create an instance of the renderer with
Code:
togglerenderer = gtk_cell_renderer_toggle_new();
and create a column with
Code:
visible_col = gtk_tree_view_column_new_with_attributes(_("Visible"), togglerenderer,
"active", VISIBLE_COL, NULL);
Because the documentation says that the default value for activatable is TRUE, I supposed this should be enough to make the buttons activatable. But in fact, it happens nothing when I click on one of these.
Well, I also tried to set the activatable property explicit.
First try:
Code:
gtk_cell_renderer_toggle_set_activatable(GTK_CELL_RENDERER_TOGGLE(togglerenderer), TRUE);
Doesn't change anything. Second try:
Code:
visible_col = gtk_tree_view_column_new_with_attributes(_("Visible"), togglerenderer,
"active", VISIBLE_COL,
"activatable", TRUE,
NULL);
This ends in the following error message:
Quote:
GLib-GObject-WARNING **: unable to set property `activatable' of type `gboolean' from value of type `gchararray'
What else do I have to do to make the buttons (un)checkable by clicking on it with the mouse?
Thanks for answers.