Re: [gtkmm] Gtk::TreeView on gtkmm
- From: "Andreas B. Thun" <abt gmx de>
- To: Matthew Walton <matthew alledora co uk>, gtkmm-list gnome org
- Subject: Re: [gtkmm] Gtk::TreeView on gtkmm
- Date: Tue, 20 Jan 2004 15:21:59 +0100
Now it is me who is completely confused.
I do it this way: m_tree_sel_ref->signal_changed ()
Ok, I have major problems
because I still cannot make a selection highlighted :-(
Andi
// Build ListStore/TreeView
m_list_store_ref = Gtk::ListStore::create(m_columns);
m_tree_view.set_model(m_list_store_ref);
m_tree_view.set_rules_hint();
m_tree_view.set_size_request();
// Handle selection
m_tree_sel_ref = m_tree_view.get_selection();
m_tree_sel_ref->set_mode (Gtk::SELECTION_SINGLE);
m_tree_sel_ref->signal_changed ().connect( <<<<<<<<<<<<<<<<<
SigC::slot(*this, &ConstraintTable::selection_made_cb));
If you connect a signal handler to Gtk::TreeView::signal_row_activated()
you will catch double-clicks on rows, and also the user pressing enter
when a row is highlighted. Single click to highlight the row is built in
behaviour in a Treeview.
The signal handler to connect to signal_row_activated should have a
prototype like
void handler(const Gtk::TreeModel::Path &, Gtk::TreeViewColumn*)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]