-
$model = new gtkliststore(GTK::TYPE_BOOLEAN,Gtk::TYPE_STRING);
-
$model_sort = new GtkTreeModelSort($model);
-
$render = new GtkCellRendererToggle();
-
$render->set_property('activatable', true);
-
$render->connect('toggled', 'on_toggle',$model);
-
/after tha goes the lines of creating the text column and filling the list/
-
$list -> set_model($model_sort);
-
-
-
/function on_toggle
-
function on_toggle($renderer, $row,$model,$model_sort) {
-
$iter = $model->get_iter($row); // get the iter
-
$model->set($iter, 0, !$model->get_value($iter, 0)); // note 5
-
}
-
-
Posted by dimitris Fri 9th Feb 2007 11:10 - Syntax is None/text - 33 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
Description:
/*problem*/
when i press the checkbox while the list is sorted list is doing some wired
staff like swaping rows moving the row where i pressed the checkbox last
and all this.SOmetimes it doesnt work at all
/*problem*/
when i press the checkbox while the list is sorted list is doing some wired
staff like swaping rows moving the row where i pressed the checkbox last
and all this.SOmetimes it doesnt work at all
PermaLink to this entry https://pastebin.co.uk/10137
Posted by dimitris Fri 9th Feb 2007 11:10 - Syntax is None/text - 33 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers