Re: Flipping a TreeView



On Thursday 09 October 2003 09:05, Andrew E. Makeev wrote:
> 1st - you could to implement your own CellRenderer for your coulumn and
> render data as you would to see it.
> 2nd - attach function to column<gchar *> that will format data for you
> (property "text").
> Description is available in GTK API Reference.
>
> Duncan Sands wrote:
> >Dear gurus, I have a treeview which looks like this:
> >
> >A	1.0		B
> >C	2.0		D
> >...
> >Y	25.0		Z
> >
> >
> >This reflects the model (which needs to be like this because
> >all elements of a column must have the same type).
> >
> >I would like it to be displayed like this:
> >
> >A	C	...	Y
> >1.0	2.0	...	25.0
> >B	D	...	Z
> >
> >i.e. flipped (transposed).  Is there some flag that can be set to do this?

Hi Andrew, thanks for your help.  I don't think it solves my problem though:
I don't want the text to be rendered differently, I want it to be rendered in
a different place: I would like the text at position (I,J) in the model to be
rendered in position (J,I) in the view.  As far as I understand, cell renderers
work on columns: you associate column I of the tree view with some column
I' of the model, and the renderer renders the column.  Using your own
renderer won't change the fact that columns of the model correspond to
columns of the view, and I would like a column of the model to correspond
to a row of the view.

Maybe I need to write my own model?

Thanks again,

Duncan.



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