Re: TreeView
- From: Leandro Fanzone <leandro hasar com>
- Cc: gtkmm-list gnome org
- Subject: Re: TreeView
- Date: Thu, 26 Jan 2006 11:48:03 -0300
Along with Caryl, I will give my opinion about it, having used both
CList and TreeView over a number of years. Probably both are the two
possible extremes of what one really needs. CList was far too
simplistic, but quick enough to throw a list of something "right now" in
a dialog. TreeView, on the other hand, is far too complex, baroque as
nothing is in gtk(mm), though excellently wrapped in C++, it is still
very dificult to understand (especially if you have to customize it a
liitle), and I found myself ending up copying/pasting code from past
projects to make it work, and writing more generic code to achieve the
usual things: numeric/string columns with validations, with all the
usual stuff to add them.
I think, for the first comer, it's appallingly overwhelming to learn
enough to be a scholar especialized in TreeView just to show a small
list of data, which is something quite usual for any application out
there. If we add to that the serious performance problems TreeView has
with large amounts of rows, well, it seems to be reasonable to have
CList back, if only to have an option, both for the newbie, for the
quick-and-dirty stuff, and for the "I need the simplest and faster one
to show a zillion of rows". My two (argentinean peso) cents here.
Leandro.
J. Baltasar Garcia Perez-Schofield wrote:
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)
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
- References:
- TreeView
- From: J. Baltasar Garcia Perez-Schofield
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]