Re: [gtkmm] Treeview help needed
- From: "Andreas B. Thun" <abt gmx de>
- To: bart <gtkmm hakvoort be>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] Treeview help needed
- Date: Thu, 15 Apr 2004 23:32:28 +0200
I don't think it'll wors by just passing "1" as an argument. Try passing
a Gtk::TreeViewColumn.
Yes, you are right. It sorts by the column and that´s it.
It does not matter which header I click on.
So I tried this but it does not work.
I have the feeling that I have to connect callbacks to the
headers ... somehow?
m_list_store_ref = Gtk::ListStore::create(m_columns);
m_list_store_ref->set_sort_column_id(m_columns.m_col_active, Gtk::SORT_ASCENDING);
m_list_store_ref->set_sort_column_id(m_columns.m_col_type, Gtk::SORT_ASCENDING);
m_list_store_ref->set_sort_column_id(m_columns.m_col_id, Gtk::SORT_ASCENDING);
m_list_store_ref->set_sort_column_id(m_columns.m_col_elements, Gtk::SORT_ASCENDING);
m_list_store_ref->set_sort_column_id(m_columns.m_col_description, Gtk::SORT_ASCENDING);
m_tree_view.set_model(m_list_store_ref);
.h:
// Tree model columns:
class ModelColumnsTAB : public Gtk::TreeModel::ColumnRecord
{
public:
ModelColumnsTAB()
{
add(m_col_active);
add(m_col_type);
add(m_col_id);
add(m_col_elements);
add(m_col_description);
}
Gtk::TreeModelColumn<Glib::ustring> m_col_active;
Gtk::TreeModelColumn<Glib::ustring> m_col_type;
Gtk::TreeModelColumn<Glib::ustring> m_col_id;
Gtk::TreeModelColumn<Glib::ustring> m_col_elements;
Gtk::TreeModelColumn<Glib::ustring> m_col_description;
};
const ModelColumnsTAB m_columns;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]