Append to list store doesn't get all column attributes
- From: James <jamessteward optusnet com au>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Append to list store doesn't get all column attributes
- Date: Thu, 28 Jul 2011 13:41:15 +1000
Hi,
(Sorry if this appears twice. I sent it from the wrong address earlier.)
In a dialog with a scrolled window displaying a list, with one column in
the view, where the cells are editable;
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view),
-1,
"Name",
renderer,
"text", 0,
"editable", TRUE,
NULL);
A button in the dialog allows the user to add to the list with;
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter,
0, "New",
1, 0,
-1);
p = gtk_tree_model_get_path(model, &iter);
c = gtk_tree_view_get_column(GTK_TREE_VIEW (view), 0);
gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW (view), p, NULL, FALSE, 0.0,
0.0);
gtk_tree_view_set_cursor(GTK_TREE_VIEW (view), p, c, TRUE);
gtk_widget_grab_focus (view);
The item "New" is indeed appended to the list, and it scrolls to the
correct cell, however "New" is not editable, and no matter what I've
tried, I can't make it editable.
Can anyone offer a clue as to why?
Regards,
James.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]