TreeView : selected_foreach_iter callback
- From: Xavier Larrodé <xlarrode gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: TreeView : selected_foreach_iter callback
- Date: Sun, 24 May 2009 09:23:43 +0200
Hi,
I'm adding multiple selection on my TreeView, following the gtkmm tutorial.
So i created a callback , but my program never enter on this function.
May i need to connect other event to my treeview in order to do that ?
<code>
_treeview->append_column( *pColumn ); // Passes a Reference (&) to what
_treeview->append_column("Name", _
model.name);
//Fill the TreeView's model
Gtk::TreeModel::Row row = *(_refTreeModel->append());
row[_model.type] = "SceneNode";
row[_
model.name] = "Root";
_treeview->set_headers_visible(true);
_treeview->set_rules_hint(false);
_treeview->set_reorderable(false);
_treeview->set_enable_search(true);
_treeview->set_search_column (1);
Glib::RefPtr<Gtk::TreeSelection> refTreeSelection =
_treeview->get_selection();
refTreeSelection->set_mode(Gtk::SELECTION_MULTIPLE);
refTreeSelection->selected_foreach_iter(
sigc::mem_fun(*this, &ProcessGroup::selected_callback) );
_treeview->show();
_treeview->add_events(Gdk::BUTTON_PRESS_MASK);
_treeview->add_events(Gdk::KEY_PRESS_MASK);
...
</code>
Thanks
--
Xavier Larrodé
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]