Re: background color in gnome-canvas
- From: kevinmay public xm fj cn
- To: Vivek Singhal <vivek_iitg yahoo com>
- Cc: gnome-list gnome org
- Subject: Re: background color in gnome-canvas
- Date: Sun, 10 Mar 2002 16:41:14 +0800
hi, you can simply change the style of the widget. Do that as following:
GdkColor bgcolor=your_color_here();
GtkStyle * style;
GtkStyle * defstyle;
GtkWidget * widget=your_widget_here();
defstyle=gtk_widget_get_default_style();
style=gtk_style_copy(defstyle);
style->bg[GTK_STATE_NORMAL]=bgcolor;
gtk_widget_set_style(widget, style);
Note do not modify the default style of widget derectly, you should modiy
the copy of it.
Kevin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]