Re: a TreeModel that's sortable and filterable?





2008/6/16 José Alburquerque <jaalburquerque cox net>:

That's really strange.  Just out of curiosity,  I  modified  the ListStore example found here <http://www.gtkmm.org/docs/gtkmm-2.4/examples/book/treeview/list/> with the attached patch to sort its rows and use a TreeModelFilter with the ListStore as its child to exclude the row with id 4 and it works fine.  Would you be able to do something similar?

The patched example work fine, but try to add this two lines and then make click in the id column:
 
  for(guint i = 0; i < 2; i++)
  {
    Gtk::TreeView::Column* pColumn = m_TreeView.get_column(i);
    pColumn->set_reorderable();
  }

 +  pColumn = m_TreeView.get_column(0);
 +  pColumn->set_sort_column(m_Columns.m_col_id);



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