Re: R: GtkTreeView and row separator?

On Tue, Jul 29, 2003 at 08:54:52AM +0200, Deganello Aligi wrote:

So no one knows how to make grids with GtkTreeView? It was possible with
GtkClist. There you specified background and foreground colors on the
Clist and then you had different colors on the widgets inside. 

I haven't tried it, but you can set background/foreground colors on a
cell-by-cell basis.  For background colors, you could have something 
like the following in your model

[..., 5, "red",  6, "blue"]
[..., 5, "blue", 6, "red"]

Then when adding your columns, even cells get their background from column 
5 and odd ones from 6 and vice-versa for foreground:

for i in range(ntreeviewcols):
    treeview.addcolumn(colname, cell, ..., cell_background=5+i%2,

(You wouldn't actually use red and blue I hope!)

Dave Cook

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