GtkTreeViewColumn with a Pixmap
- From: O-Zone <o-zone zerozone it>
- To: gtk-app-devel-list gnome org
- Subject: GtkTreeViewColumn with a Pixmap
- Date: Tue, 3 Jun 2003 11:59:57 +0000
Hi all,
here my piece of code:
/* Tree List Widget */
filetreestore = gtk_tree_store_new(2,G_TYPE_STRING,G_TYPE_STRING);
filetree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(filetreestore));
g_object_unref(G_OBJECT(filetreestore));
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(filetree), TRUE);
column = gtk_tree_view_column_new();
gtk_tree_view_column_set_title(column,"File Browser");
renderer = gtk_cell_renderer_pixbuf_new();
gtk_tree_view_column_pack_start(column,renderer,FALSE);
gtk_tree_view_column_set_attributes(column,renderer,"pixbuf",1,NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_column_pack_start(column,renderer,FALSE);
gtk_tree_view_append_column(GTK_TREE_VIEW(filetree),GTK_TREE_VIEW_COLUMN(column));
................
I want to create a simple filebrowser that, in the same column, include name
of file and a PixMap (to identify a DIRECTORY or a FILE). I see the code from
the gtk-demo but isn't so clear and i'm unable to get it work.
When i append a row:
/* Adesso aggiungi al TREE VIEW */
gtk_tree_store_append(GTK_TREE_STORE(filetreestore),&nodeiter,parentiter);
gtk_tree_store_set(GTK_TREE_STORE(filetreestore),&nodeiter,0,dirname,-1);
how i can add the pixmap ? In this mode i only get a GTK Error to stderr.
Oz
--
O-Zone !
www.zerozone.it
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]