Re: Gtk::Image in TreeView



I hope this helps:

http://www.dooglio.net/sorted_tree_1.1.tar.gz

This is a TreeView with sorted columns, and one of the columns is an
image (I used the gnome dice svg images from Gtali). You can
subsititute in any image format, but the point of how to do it is
clear (I hope).

You almost had it right. You add a TreeModelColumn of a
Glib::RefPtr<Gdk::Pixbuf>. Then you add the column to your model and
TreeView.  I added an invisible field to associate with the pixbuf for
sorting purposes (otherwise the model would sort by Pixbuf pointer).

Enjoy!

On 12/8/05, Intangir <intangir gmail com> wrote:
> how do i have an image column in a TreeView?
>
>  i thought i had seen it somewhere but i cant find it now..
>  i tried to just do Gtk::TreeModelColumn<Gtk::Image>
> m_colTesting;
>  but that wont work
>
>  i know there hAS to be a way to have icons in columns..
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
>


--
R. Douglas Barbieri
doug dooglio net



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