Re: GtkTreeView row colour not continuous
- From: kiraly laszlo <kirusz freemail hu>
- To: tomas tuxteam de
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GtkTreeView row colour not continuous
- Date: Wed, 7 Jun 2006 01:25:37 +0200 (CEST)
tomas tuxteam de wrote:
On Mon, Jun 05, 2006 at 06:32:45PM +0200, kiraly laszlo wrote:
Hi list,
I have a problem with GtkTreeView.
I want to change the colours of the rows of the GtkTreeView
dynamically.
[...]
How can I make continuous colour without gaps, like in the
selection?
The GtkTreeView widget has an "horizontal-separator" style
property,
with default value 2. It is read-only, alas, but may be
settable through
the style interface.
May be this helps you to find a solution. Let me know if
you find one
-- tomás
Yes, this is good but one. Now, only the first column has gap.
http://kiru.mikroweb.hu/gtk2.jpg
This column is with 4 pixmaps.
The relevant code:
column = gtk_tree_view_column_new();
gtk_tree_view_column_set_alignment(column, 0.5);
gtk_tree_view_column_set_title(column, "Termékfotó");
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_add_attribute(column, renderer,
"pixbuf", L_KEP);
gtk_tree_view_column_add_attribute(column, renderer,
"cell-background", L_SZIN);
renderer = gtk_cell_renderer_pixbuf_new();
g_object_set(renderer, "cell-background-set", TRUE, NULL);
renderer->yalign = (gfloat) 0.1;
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_add_attribute(column, renderer,
"pixbuf", L_MINOSEG1);
gtk_tree_view_column_add_attribute(column, renderer,
"cell-background", L_SZIN);
renderer = gtk_cell_renderer_pixbuf_new();
g_object_set(renderer, "cell-background-set", TRUE, NULL);
renderer->yalign = (gfloat) 0.1;
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_add_attribute(column, renderer,
"pixbuf", L_MINOSEG2);
gtk_tree_view_column_add_attribute(column, renderer,
"cell-background", L_SZIN);
renderer = gtk_cell_renderer_pixbuf_new();
g_object_set(renderer, "cell-background-set", TRUE, NULL);
renderer->yalign = (gfloat) 0.1;
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_add_attribute(column, renderer,
"pixbuf", L_MINOSEG3);
gtk_tree_view_column_add_attribute(column, renderer,
"cell-background", L_SZIN);
gtk_tree_view_append_column (GTK_TREE_VIEW(listview), column);
column = gtk_tree_view_column_new();
gtk_tree_view_column_set_alignment(column, 0.5);
gtk_tree_view_column_set_title(column, "Termékfotó");
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_add_attribute(column, renderer,
"pixbuf", L_KEP);
gtk_tree_view_column_add_attribute(column, renderer,
"cell-background", L_SZIN);
renderer = gtk_cell_renderer_pixbuf_new();
g_object_set(renderer, "cell-background-set", TRUE, NULL);
renderer->yalign = (gfloat) 0.1;
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_add_attribute(column, renderer,
"pixbuf", L_MINOSEG1);
gtk_tree_view_column_add_attribute(column, renderer,
"cell-background", L_SZIN);
renderer = gtk_cell_renderer_pixbuf_new();
g_object_set(renderer, "cell-background-set", TRUE, NULL);
renderer->yalign = (gfloat) 0.1;
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_add_attribute(column, renderer,
"pixbuf", L_MINOSEG2);
gtk_tree_view_column_add_attribute(column, renderer,
"cell-background", L_SZIN);
renderer = gtk_cell_renderer_pixbuf_new();
g_object_set(renderer, "cell-background-set", TRUE, NULL);
renderer->yalign = (gfloat) 0.1;
gtk_tree_view_column_pack_start(column, renderer, TRUE);
gtk_tree_view_column_add_attribute(column, renderer,
"pixbuf", L_MINOSEG3);
gtk_tree_view_column_add_attribute(column, renderer,
"cell-background", L_SZIN);
gtk_tree_view_append_column (GTK_TREE_VIEW(listview), column);
Thank you for your help
kiru
_______________________________________________________________________________
Dedikált mesekönyvek Marék Veronikától
http://www.bookline.hu/control/shlist?id=305&affiliate=fredmkkar2691
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]