Re: CellRenderText properties question.



* Diego Zuccato (diego otello alma unibo it) wrote:
> "Carl B. Constantine" wrote:
> 
> > Thanks for the reply. That confirms what I suspected, but IMHO very bad
> > design as it creates extra overhead for memory and storage in the
> > TreeModel (ListStore in this case) instead of being able to determine
> > the property programatically. What if I have a preference setting where
> > the user change pick a color so it's not just "red" or "blue" it's
> > "between blue and purple"?
> You can have multiple views on the same model, and tha'ts the real power
> of the new widgets over GtkCList and GtkCTree (that, OTOH, are much
> faster).
> And as Owen said (and I didn't know!) you can have a callback to
> calculate on the fly the properties.

Indeed. I'll try this a little later today, but if I have the extra data
in the model and currently that column has a black setting for each
cell, and then I set a cell in that column to "red", will the visible
text then automatically change color for that cell?

> As you probably already understood, it's not an "hide it" matter.
> If you follow the easy way, then you store different attributes in
> different MODEL columns. But these columns get ALL referenced when you
> add a new column to the VIEW. This way you could have different
> attribute sets for different views.

again, will try some test code in a couple hours to test this and see
what happens, but any pointers you can give would be helpful.

-- 
 .''`.      Carl B. Constantine
: :' :     duckwing duckwing ca
`. `'    GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom

Attachment: pgp3dB8Z3e64y.pgp
Description: PGP signature



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