Hi all, I am working on am application that uses a GtkTreeView to display a two-column list of information. There are a couple of things that I want to achieve but I am having some difficulty getting to work:
1. I want to have one of the columns be editable but only on a certain keypress. I would like to keep the double-click event produce the row-activated signal. In other words, I want to prevent editing on double-click but still allow the column to be editable. Originally, I tried to set the column cell rendered as non-editable to get the "row-activated" behaviour and then set the editable property when a row is selected with a single click. However, that did not work. It's also a big pain to get the actual cell renderer. Is this achievable at all? Is there a way to keep the double-click event as "row-activated" while still allowing cells to be editable? 2. I read online that by default, a row is selected when a tree view is focus even if the selection mode is SINGLE. I would like to avoid having Gtk select the first row automatically. I tried calling gtk_tree_selection_unselect_all() but that was pointless since the window in which the the tree view is added (a GtkDialog) gets focus later when the gtk_dialog_run() function is called. I am guessing that I can work around this by calling gtk_widget_show_all() on the dialog first, then gtk_tree_selection_unselect_all(), and then gtk_dialog_run() but I am not sure. I would appreciate some help with the above questions. Thank you.
_______________________________________________ gtk-list mailing list gtk-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-list