Re: drawing stuff inside the TreeView
- From: Alexei D <alexei_gtk yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: Re: drawing stuff inside the TreeView
- Date: Wed, 22 Jun 2005 11:17:33 -0700 (PDT)
Tim, thank you VERY much for the answer! Just one
question. You said:
use ready-made circles in form of GdkPixbufs.
where do I find those ready-made icons? Are you
refering to GTK stock items? I can't seem to find
other pixbuf icons from the reference manual. Could
you point them to me please?
Thanks, Alexei.
--- Tim Müller <zen18864 zen co uk> wrote:
On Wednesday 22 June 2005 17:18, Alexei D wrote:
I need to create a Tree widget that has 1
column.
Each row in the column should contain a small
circle
and some text (filename) next to it. The color of
the
circle represents the file type. I have to draw
circles myself with gdk_draw_arc(). But I cannot
see
how I can draw something inside the Tree Column.
Then, how do I pack the circle AND text inside 1
column? Is it possible to put 2 things in 1
column,
The easiest way is to pack a pixbuf renderer with a
text renderer into the
same tree view column and use ready-made circles in
form of GdkPixbufs. Just
add another column of type GDK_TYPE_PIXBUF to your
list store for that and
connect the 'pixbuf' property of the pixbuf renderer
to the column number of
that model column via tree view column attributes
(just like you do with the
'text' property for the text renderer).
Alternatively, if you really must use
gdk_draw_arc(), you can write a custom
cell renderer, but that's a lot more work and
probably slower as well.
Cheers
-Tim
____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]