Re: How to change the color and font of a GtkLabel



Hi,

To change the color/font you want to create and modify a GtkRcStyle,
then call gtk_widget_modify_style() to apply it to the widget, then
unref the rc style.

If you look at GTK devel version from CVS, there are functions in
gtkwidget.c gtk_widget_modify_fg(), gtk_widget_modify_font() etc. that
you could copy (you'd have to change them slightly, but they'll give
you the idea). And of course in the 2.0 release you can just use these
functions and your life will be simpler than it is now.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]