Re: Storing images in GtkTreeView model
- From: Andrew Wood <ajwood theiet org>
- To: gtk-app-devel-list gnome org
- Subject: Re: Storing images in GtkTreeView model
- Date: Wed, 16 Dec 2009 21:26:12 +0000
Excellent thank you.
Tadej BorovÅak wrote:
Hello.
/lhs_store=gtk_list_store_new(2,G_TYPE_STRING,G_TYPE_PIXBUF); //2 cols, 1st
is string, 2nd is icon/
Store creation should be done like this:
lhs_store = gtk_list_store_new( 2, G_TYPE_STRING, GDK_TYPE_PIXBUF );
Hint: For most of GTK+/GDK types, you can get tybe by this simple convention:
GtkWidget -> GTK_TYPE_WIDGET
GdkPixbuf -> GDK_TYPE_PIXBUF
...
/gtk_list_store_set(lhs_store,&lhs_treeiter,0,"Subscribers",-1); //put
string in col0/
To store pixbuf in second column, do something like this:
gtk_list_store_set( lhs_store, &lhs_treeiter, 0, "Subscribers", 1, pixbuf, -1 );
Tadej
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]