TreeView
- From: "J. Baltasar Garcia Perez-Schofield" <jbgarcia uvigo es>
- To: gtkmm-list gnome org
- Subject: TreeView
- Date: Thu, 26 Jan 2006 12:56:19 +0100
Hi, there !
I have a TreeView used in order to show some information. However, I
would like the user to have the opportunity to show some columns and
hide others. The TreeModel needs therefore to be dynamic. So I was
creating the famous column layout:
class DocumentColumns : public Gtk::TreeModel::ColumnRecord {
public:
Gtk::TreeModelColumn<string> data;
DocumentColumns()
{}
createColumns();
};
However, I need to specify the actual number of
Gtk::TreeModelColumn<>'s I need, and I simply don't know they number at
compile time. Would it be possible to create a vector of
Gtk::TreeModelColumn<>'s, and adding that dynamically-created columns ?
Will the TreeView change when the model changes (afer calling
createColumns() and set_model()) ? Or do I have to recreate the TreeView
from the beginning ?
Actually (this is constructive criticism), I have to confess that I am
very disappointed with TreeView and the absence or CList (or something
like that). I would like to add string columns and rows for simple uses
such as this one in a simple way, and not with the overhead that
TreeView implies, which is good for advanced uses but excessively
complex for the easiest ones.
I wonder why CList was not re-implemented for Gtkmm2 as a wrapper for
TreeView. Or maybe there is another component doing this which I don't
know about.
Salud !
Baltasar
--
PBC -- J. Baltasar García Perez-Schofield
jbgarcia en uvigo de es http://webs.uvigo.es/jbgarcia/
Dep. Informática, Universidad de Vigo, España (Spain)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]