Re: dealing with column data



Carl B. Constantine wrote:
I'm writing an app that uses GtkTreeView widget to display data.
However. for two of these GtkTreeViews, the data isn't really row based,
but column based. It's more like a spread sheet and I don't think GTK
has anything akin to what I want.

Essentially, I want to be able to select an individual cell in a table.
Get the data, right-click to popup a menu and perform some function.
GtkTreeView isn't geared for this. I don't want to select an entire row.

Does anyone have any hints on how to accomplish this?

Have you looked at <http://gtkextra.sourceforge.net/>? They've got a spreadsheet-like widget that may do the job. I haven't tried it.

On another note, I've been pooring over the documentation for
GtkTreeView in particular but other widgets as well and it astounds me
(as a veteran technical writer for Metrowerks a while back) the lack of
documentation. I don't mean/want to be harsh, but how can the developers
of Gtk+ expect developers to write apps when there is such a lack of
docs on many of the widget classes and methods? Let me give a practical
example from the GtkTreeView class and one other widget:

http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeViewColumn.html

The description for GtkTreeView column is incomplete. It says:

"The GtkTreeViewColumn object is a visible column in a GtkTreeView
widget. It determines the geometry, type"

and that's as far as it gets.

http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#GtkTreeView-select-cursor-row

here, arg1 and returns are blank. What are they supposed to be? When
should this be called?

I really think there needs to be some more docs. The Gtk 2.0 tutorial is
missing docs on several widgets. it would be nice to get these filled
in.

Just my $0.02 worth.

I sympathise. What would be really useful would be a distributed "document it as you find it" system. If you find something that's not in the docs, then you write a few lines and submit it, and future users could browse the database and wouldn't have to waste time finding out how something really works. This would have saved me hours.

Evan





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