[gtkmm] Understanding TreeView
- From: Morten Brix Pedersen <morten wtf dk>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Understanding TreeView
- Date: Sun, 7 Jul 2002 01:32:02 +0200
Hi,
I'm trying to understand Gtk::TreeView and its friends.
So, with a TreeView, I can append columns using the append_column member
function. There is two of these:
int Gtk::TreeView::append_column ( const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column )
int Gtk::TreeView::append_column ( TreeViewColumn& column )
Using the former, is it right to assume that the TreeViewColumn is actually a CellRendererText?
Because these two code examples yields the same results:
1:
_treeview.append_column("Description", _cols.description);
2:
Gtk::CellRendererText *celltext = new Gtk::CellRendererText();
Gtk::TreeViewColumn *column = new Gtk::TreeViewColumn("Description", *Gtk::manage(celltext));
column->add_attribute(celltext->property_text(), _cols.description);
_treeview.append_column(*Gtk::manage(column));
By the way, gtkmm needs a good and simple TreeView example, the
cellrenderercustom example is powerful but very poor to learn from.
Should I open a bug for this?
- Morten.
--
http://wtf.dk/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]