[Gtk-sharp-list] Row Header for GTK# GtkTreeView/ListStore

Rodrigo Moya rodrigo@ximian.com
26 Jan 2003 14:24:06 +0100

On Sun, 2003-01-26 at 10:56, Daniel Morgan wrote:
> How I would I create a row header in gtk# for a GtkTreeView using a
> ListStore model?
> A row header would have the same style like the column header, for instance,
> if the column header was grayed and 3D raised, the row header would too.
> The row header would be used for status to indicate the row added, changed,
> or marked for deletion.
> The status is just an indicator, its up to the application programmer to do
> something with that indicator.  I would use this in database applications
> where data needs to be displayed to the user in rows and columns.
> I heard I would need to create a cell renderer for this.  How do I do this
> in Gtk#?
well, since the column headers are just buttons AFAIk, you can do the
same for the row headers. So, I would write a GtkCellRendererWidget,
which can be easily based on the GtkCellRendererToggle class already
available in GTK 2.0. That is, you need to create a
Gtk.CellRenderer-based class which is able to render widgets on cells.

> I also heard this seemed like a spreadsheet like GtkSheet.  However, I don't
> think GtkSheet is part of base gtk+ 2.x.
no, it's part of gtk-extras, a 3rd party library.

>   Also, I'm not looking for
> spreadsheet functionality - just the ability to view and edit tabular rows
> and columns of data and indicate to the user when a row has been added,
> changed, or marked for deletion.
then, the CellRendererWidget approach seems the best way, so you can add
any widget you want to the cell.

Rodrigo Moya <rodrigo@ximian.com>