Re: editable cells in GtkListView
- From: tom roth <tom tomroth de>
- To: gtk-perl-list gnome org
- Subject: Re: editable cells in GtkListView
- Date: Tue, 18 Feb 2003 17:06:11 +0100
Thank you a lot, this really helps.
it actualy looks quiet easy now.
On 15 Feb 2003 20:07:39 -0500
muppet <scott asofyet org> wrote:
# tell this renderer that its cells are to be editable
$cell->set_property ("editable", 1);
Unfortunatedly i ran just into another problem:
i assume i have to change the model after the edit is complete.
so i set up a signal like this.
$edit_cell->signal_connect('edited', \&on_cell_edited, $model);
And a Callback
sub on_cell_edited {
my ($cell,$path_string,$new_text,$dataref, $model) = @_;
my $iter = $model->get_iter_from_string($path_string);^
$model->set($iter, [1 => "$new_text"]);
}
1 first problem $model is not passed to on_celledited, i did quick hack and made $model a global variable,
but i am obviuosly doing something wrong.
2 i hardcoded the second column to be updated, how do i evaluate wich column was edited ?
Please help, once i got this going i will write a little perl example for other dummies like me.
tom
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]