[EMAIL PROTECTED] wrote:
>
> Hi. I was trying to change the color of a button.
> I tried the command
>
> button->style->bg = black;
>
> where black is defined as
>
> black.red = 0;
> black.greeen = 0;
> black. blue = 0;
>
> but I get the error
>
> incompatible types in assignment of `_GdkColor' to `_GdkColor[5]'
>
> Any Ideas.
>
Soon discuss but,
here a part from a program
style = gtk_widget_get_style (preview);
style = gtk_style_copy (style);
/* On modifie les attributs de couleurs*/
gdk_color = gdk_color_copy (&style->fg[GTK_STATE_NORMAL]);
gdk_color->red = (gushort)(cube_color[0] * 65535);
gdk_color->blue = (gushort)(cube_color[2] * 65535);
gdk_color->green = (gushort)(cube_color[1] * 65535);
style->bg[GTK_STATE_NORMAL] = *gdk_color;
style->bg[GTK_STATE_ACTIVE] = *gdk_color;
style->bg[GTK_STATE_PRELIGHT] = *gdk_color;
style->bg[GTK_STATE_SELECTED] = *gdk_color;
style->bg[GTK_STATE_INSENSITIVE] = *gdk_color;
gtk_widget_set_style (preview, style);
--
Florent DEVIN, 33 (0)3 20 43 47 30, Fax (33) (0)3 20 43 65 66 (Fax LIFL)
LIFL, Laboratoire d'Informatique Fondamentale de LILLE
USTL, Bureau 326, Batiment M3, 59655 Villeneuve d'Ascq Cedex
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list