TreeView - header resizable.



So basically I have simple TreeView with some string and a header:

		class ModelColumns : public Gtk::TreeModel::ColumnRecord {
			public:
				ModelColumns() { 
					add(m_col1);
				}
			Gtk::TreeModelColumn<Glib::ustring> m_col1;
			
		};
		ModelColumns m_Columns;
		
		Gtk::TreeView *m_TreeView;
		Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
		Glib::RefPtr<Gtk::TreeSelection> m_refTreeSelection;

And then:

		m_refGlade->get_widget("treeview1", m_TreeView);
    		if(m_TreeView) {
				m_refTreeModel = Gtk::ListStore::create(m_Columns);
				m_TreeView->set_model(m_refTreeModel);
		
				Gtk::TreeModel::Row row = *(m_refTreeModel->append());
				row[m_Columns.m_col1] = "testing";

				m_TreeView->append_column("Header", m_Columns.m_col1);
		}


I want to make header resizable. I know that TreeViewColumn has
set_resizable(bool resizable=true), and I think this does what I need.

How do I do this here in my code ? What I have is TreeModelColumn.
Thanks



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