Red Hat Bugzilla – Bug 235600
properties of cell renderer are not recognized by g_object_set
Last modified: 2007-11-30 17:12:01 EST
Description of problem: g_object_set will recognize some properties of
cell_renderer_text but not others. Specifically, alignment, width-chars, rise,
xalign, and scale did not work when inserted with g_object_set(). May be others
that do or do not work -- I did not try all. All should work. GTK2 version
with FC6 used is 2.10.8-1.
Version-Release number of selected component (if applicable):
How reproducible: Code in program with gtk_tree_view list. Attempt to set
properties on cell created with gtk_cell_renderer_text,
namecell = gtk_cell_renderer_text_new ();
// g_object_set(G_OBJECT(namecell),"alignment",2,NULL); // Doesn't work!!!
namecol = gtk_tree_view_column_new_with_attributes ("Vendor\n Name",
namecell, "text", 1, NULL);
gtk_tree_view_column_set_alignment (namecol, .5); // centers the col heading
- works OK
gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), GTK_TREE_VIEW_COLUMN
Steps to Reproduce:
1.Code as above. (or, if this is not right, as it should be.)
Actual results: Does not work, default alignment is left and is not effected.
Expected results: Expect alignment to be either right or center depending on
Additional info: Cell alignment is supposed to be new property in gtk2-2.10. . .
All other aspects of creating a list and filling cells with data work OK as far
as I have tried. Above code snippet is for reference only and is not complete
Please file this as an upstream bug in bugzilla.gnome.org