gtktreeview

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

gtktreeview

Andrea Zagli
is there a way to have various cellrender type for each row for the same
column?

example:

row 1 with gtkcellrenderertext
row 2 with gtkcellrenderercombo
row 3 with gtkcellrenderertext
row 4 with gtkcellrenderertoggle
ecc
ecc

_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: gtktreeview

Paul Pogonyshev
Andrea Zagli wrote:
> is there a way to have various cellrender type for each row for the same
> column?
>
> example:
>
> row 1 with gtkcellrenderertext
> row 2 with gtkcellrenderercombo
> row 3 with gtkcellrenderertext
> row 4 with gtkcellrenderertoggle

No (at least not that I know of.)  But you can write a custom renderer,
which draws differently depending on the row.  For instance, dispatch
drawing to different existing renderers.

Paul
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: gtktreeview

Tim-Philipp Müller
In reply to this post by Andrea Zagli
On Wed, 2006-08-23 at 14:45 +0200, Andrea Zagli wrote:

> is there a way to have various cellrender type for each row for the same
> column? Example:
>
> row 1 with gtkcellrenderertext
> row 2 with gtkcellrenderercombo
> row 3 with gtkcellrenderertext
> row 4 with gtkcellrenderertoggle

You _might_ be able to do this packing cell renderers like this:

  [text renderer] [combo renderer] [toggle renderer]

and then connecting each renderer's "visible" property to a boolean type
model column and then setting the values in the model so that only one
of the three renderers is visible for each row. Never tried it myself,
but it might just work with a bit of fiddling.

Cheers
 -Tim


_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list