Re: Gtk2::SimpleList



Hi ,

En ce jour du Sun, 30 May 2004 21:19:44 -0400,
muppet <scott asofyet org> parlait ainsi :
Right. I'm just getting to the point where I want to use TreeViews 
with editable data.
How do I know which row has been edited?
I can call a sub when a row_changed signal is fired, but the sub only 
received 2 things: the simplelist that triggered the signal, and a 
Gtk2::Gdk::Event::Button ( whatever that is ).
Am I supposed to do something with these to figure out which row has 
changed?
no, it's a little more involved than that.
Well , muppet , your answer is detailed and that was certainly the thing
to answer . But if Daniel asked for simpler things , here's what i took
back from my trip to the wnderful land of the SimpleList .

I may be mistaken but , if not , a simple

    $list->set_column_editable($column,1);

will set the cell edtable in column $column and    

    $slist->get_model()->signal_connect("row-changed", \&somesub);

will send informations like a TreeIter and a TreePath to the callback sub
, and these things are sufficient to guess which row was edited .

No :) ?

-- 
David 'lacravate'
lacravate mongueurs net
tresorier mongueurs net

Perl en France
http://www.mongueurs.net



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]