From: Marc M. <mar...@gm...> - 2008-09-16 16:13:38
|
Hello, I have a slight problem in setting the foreground and background property of a CellTextRenderer or CellComboCoxRenderer. When I execute the following when I bind some attributes of a renderer MV.cellLayoutSetAttributes colorColumn colorRenderer model (\r->[MV.cellText := "Color", MV.cellTextForegroundColor := createColor 255 0 0, MV.cellTextBackgroundSet := True, MV.cellTextBackgroundColor := createColor 255 0 0]) I see the error text GLib-GObject-WARNING **: IA__g_object_set_property: object class `GtkCellRendererText' has no property named `cell-foreground-gdk' and the background is rendered black. So it seems that setting the foreground color is not yet supported and setting the background does not work correctly. Of course my code could be wrong also. Is there a possibility to set the foreground and background color of either a CellTextRenderer or a CellComboBoxRenderer. Thanks a lot vor any help in advance and keep up the good work Marc Mertens |
From: Axel S. <Axe...@en...> - 2008-09-16 17:15:00
|
Hi Marc, On Sep 16, 2008, at 18:13, Marc Mertens wrote: > Hello, > > I have a slight problem in setting the foreground and > background property of a CellTextRenderer or CellComboCoxRenderer. > When I execute the following when I bind some attributes of a renderer > > MV.cellLayoutSetAttributes colorColumn > colorRenderer > model > (\r->[MV.cellText := > "Color", > > MV.cellTextForegroundColor := createColor 255 0 0, > > MV.cellTextBackgroundSet := True, > > MV.cellTextBackgroundColor := createColor 255 0 0]) > > I see the error text GLib-GObject-WARNING **: > IA__g_object_set_property: object class `GtkCellRendererText' has > no property named `cell-foreground-gdk' and > the background is rendered black. So it seems that setting the > foreground color is not yet supported and setting the background > does not work correctly. Of course my code could be wrong also. Is > there a possibility to set the foreground and background color of > either a CellTextRenderer or a CellComboBoxRenderer. Yes, I realised that there is a copy-and-paste bug in our implementation. The above functions incorrectly set the "cell- foreground-gdk" and "cell-background-gdk" property. However, the CellRenderer only defines "background-gdk" whereas the CellRendererText defines "foreground-gdk" and "background-gdk". (The background of the cell is slightly larger than that of teh rendered text.) This is fixed in darcs and the fix will be in the next release. Cheers, Axel. > > Thanks a lot vor any help in advance and keep up the good work > > Marc Mertens > ---------------------------------------------------------------------- > --- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Gtk2hs-users mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk2hs-users |