Re: How to make a single cell editable in Gtk::TreeView?
- From: Kjell Ahlstedt <kjell ahlstedt bredband net>
- To: Gerardo Ballabio <gerardo ballabio gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: How to make a single cell editable in Gtk::TreeView?
- Date: Tue, 06 Mar 2012 10:08:02 +0100
2012-03-06 08:48, Gerardo Ballabio skrev:
2012/3/4 Kjell Ahlstedt<kjell ahlstedt bredband net>:
The attached file is a modified version of the treeview/editable_cells
example in the gtkmm tutorial.
I've added a bool column to the tree model, and connected it to the
"editable" attribute of two TreeView columns.
Search for "//!!". It shows where I've modified the treeview/editable_cells
example in the gtkmm tutorial. See also
http://mail.gnome.org/archives/gtkmm-list/2012-February/msg00041.html where
I show how to grey out one choice in a ComboBox. It's the same technique.
Use Gtk::CellLayout::add_attribute() in a combo box, or
Gtk::TreeViewColumn::add_attribute() in a tree view.
Thank you Kjell!
Could you please add a finishing touch: how do I activate the editable
cell so that it is already in editing mode when the window pops up?
Gerardo
I haven't tested this, but I think you shall call one of the
Gtk::TreeView::set_cursor() methods with start_editing = true.
Kjell
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]