Re: [gtkmm] Gtk::TreeView on gtkmm



Andreas B. Thun wrote:

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));

So what exactly is the problem? That code should give you a handler for when the selection for that treeview changes. What do you mean by making a selection 'highlighted'?




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