Re: Window Background
- From: Satyajit <satyajit kanungo wipro com>
- To: Sridhar Chigurupati <sridhar chigurupati wipro com>
- Cc: Mailling List GTK <gtk-list gnome org>
- Subject: Re: Window Background
- Date: Mon, 08 Jul 2002 03:14:35 +0530
Hi,
with gtk 1.2 you can call gtk_widget_set_style() to
set the background/foreground color , font etc for the
widget (window for your case..). something like this will do
GdkColor Color = {0, 0x0000, 0x0000, 0x0000}; /* black */
GdkColor Color1 = {0, 0x0000, 0x0000, 0xffff}; /* blue */
GdkWidget *window;
style = gtk_widget_get_default_style ();
style_control = gtk_style_copy (style);
style_control->bg[GTK_STATE_NORMAL] = Color1;
style_control->fg[GTK_STATE_NORMAL]=Color;
style = gtk_style_copy (style_control);
gtk_widget_set_style (window, style_control);
Thanks
satya
Sridhar Chigurupati wrote:
> Hello,
>
> Can anybody please tell me a method to change the background color of a
> a window in GTK-1.2.
>
> Thanks in advance
> Sridhar
>
> ------------------------------------------------------------------------
> Name: Wipro_Disclaimer.txt
> Wipro_Disclaimer.txt Type: Plain Text (text/plain)
> Encoding: 7bit
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]