[Glade-devel] [Glade-users] Using Treeviews

On Thu, 2006-12-21 at 13:32 -0500, Tristan Van Berkom wrote:
Treeviews are designed for optimization, you can display a
dataset of 100,000 rows in a treeview and you'll only render
the visible rows - this is the excelent value of the GtkTreeView.

Over time, treeviews have been abused, people use treeviews
to display a static list of choices for example - a job much
better suited for some simple canvas implementation, a dropdown
menu, combo box or such - why do I call this abuse ? because
it shouldnt take someone the effort of writing an entire treeview
code just to display a couple of options.

TreeModels are not just used by TreeViews. GtkComboBox and GtkIconView
use too them too, for instance.

So, in the terms of what I think are valid use cases of a treeview,
where a treeview is not overkill for the task at hand, the model 
data is invariably dynamic, nothing that could be defined in a
GUI designer.

It's a difficult problem, yes.

So I would opt to sooner add support for canvases etc in glade
for those cases where people need simple hardcoded lists/choices,
and leave dynamic model data to the programmer to generate.

Maybe thats a drastic opinion ;-)

Murray Cumming
murrayc at murrayc.com

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