RE: Image and text in GtkCellRenderer
- From: martyn 2 russell bt com
- To: ahmed-1205 zabvision edu pk, gtk-app-devel-list gnome org
- Subject: RE: Image and text in GtkCellRenderer
- Date: Wed, 30 Jul 2003 09:19:54 +0100
i want to show both Text and an Image in a List view as it is done in
nautilus
when u switch to list view.
Try something like this:
GtkTreeViewColumn *column = NULL;
GtkCellRenderer *renderer = NULL;
/* cell renderer's */
column = gtk_tree_view_column_new();
/* COL_IMAGE */
renderer = gtk_cell_renderer_pixbuf_new();
gtk_tree_view_column_pack_start(column, renderer, FALSE);
gtk_tree_view_column_set_attributes(column,
renderer,
"pixbuf", COL_IMAGE,
NULL);
/* COL_TEXT */
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_set_attributes(column,
renderer,
"text", COL_TEXT,
NULL);
/* insert column */
gtk_tree_view_append_column(GTK_TREE_VIEW(view), column);
Regards,
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]