Re: Widget Colors
- From: philippe vivarelli conexant com
- To: gtk-list gnome org
- Cc: neelakanth nadgir sun com
- Subject: Re: Widget Colors
- Date: Mon, 6 Nov 2000 11:48:07 +0100
Hi,
It works for buttons but not for other widgets (Label, Frames, ..)
I tried this code below, and the button color is changed but it doesn't
work for the other widgets (a Label: label1 and a Frame : frame1)
Does someone could help
Thank you
Philippe Vivarelli
on_button1_clicked(GtkButton *button, gpointer window)
{
GtkWidget *ThisWidget;
GtkStyle* my_style;
GdkColor myGdkColor = {0, 0xAFFF, 0xFFFF, 0xCFFF};
my_style = gtk_style_copy( gtk_widget_get_default_style() );
my_style->bg[GTK_STATE_NORMAL] = myGdkColor;
my_style->bg[GTK_STATE_ACTIVE] = myGdkColor;
my_style->bg[GTK_STATE_PRELIGHT] = myGdkColor;
my_style->bg[GTK_STATE_SELECTED] = myGdkColor;
my_style->bg[GTK_STATE_INSENSITIVE] = myGdkColor;
gtk_widget_set_style(button, my_style);
ThisWidget = lookup_widget(window, "label1");
gtk_widget_set_style(ThisWidget, my_style);
ThisWidget = lookup_widget(window, "frame1");
gtk_widget_set_style(ThisWidget, my_style);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]