How to change a widget's color ?
- From: Ivo Clarysse <soggie riv be>
- To: gtk-list redhat com
- Subject: How to change a widget's color ?
- Date: Fri, 7 Nov 1997 09:44:28 +0100 (MET)
How do I change the color of a GTK widget ?
I have a widget who's background color I wish to change.
I tried this using:
mycutestyle=gtk_style_new();
*mycutestyle=*(gtk_widget_get_default_style());
gdk_color_parse("blue",&mycutecolor);
gdk_color_alloc(gtk_widget_get_colormap(parentwidget),&mycutecolor);
mycutestyle->bg[GTK_STATE_NORMAL]=mycutecolor;
gtk_widget_set_style(button,mycutestyle);
This doesn't change anything though. Should I perhaps create a new
colormap for the widget whose color I want to change ?
Should I use gtk_style_attach ? Before or after gtk_widget_set_style ?
Is there perhaps some kind of tutorial on Gtk styles somewhere ?
Soggie.
-----------------------------------------------------------------------
Ivo Clarysse <soggie@riv.be>, Riverland Research Group
Research Assistant http://www.riv.be/research/
Excelsiorlaan 42
http://www.riv.be/~soggie/me/ B-1930 Zaventem, Belgium
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]