http://qs321.pair.com?node_id=979357

renegadex has asked for the wisdom of the Perl Monks concerning the following question:

hi perl monkies, I need help in creating a simple editable treeview. Back in Gtk2, I am using Gtk2::SimpleList. Now I am having a problem because the SimpleList was removed on the Gtk3.

Now I did my research and end up with this...

my $model = Gtk3::ListStore->new('Glib::String'); my $list = Gtk3::TreeView->new(); $list->set_model($model); my $cell = Gtk3::CellRendererText->new(); $cell->set('editable'=>1); my $column = Gtk3::TreeViewColumn->new_with_attributes('name',$cell,'t +ext',$i); $list->append_column($column);

The problem here is that if I added a new row and tries to edit the contents of it by double clicking and typing a new text after I press enter, the new text is not updated. So I did googling around and found this site.

http://python-gtk-3-tutorial.readthedocs.org/en/latest/cellrenderers.h +tml#cellrenderertext

It says that I need to update the liststore manually using the edited signal. Problem is that I can't seem to find a way to properly get the iterator of the row so that I could update the liststore manually by using:

$list->set($iter,0,'edited text here');

Please help. Thanks in Advance

Mabuhay Civil Engineers! :D