Change colour of an entry



I have this two functions where Style is a global variable GtkRcStyle and Widget
is the GtkEntry

void SetFgColor(char *Colore)
{
 GdkColor FgColor;

 gdk_color_parse(Colore,&FgColor);

 Style->fg[GTK_STATE_NORMAL]=FgColor;
 Style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_FG;

here the compiler return me this error:
     " conversion from `int' to `enum GtkRcFlags'  "

 gtk_widget_modify_style(Widget,Style);
}

void SetBaseColor(char *Colore)
{
 GdkColor BaseColor;

 gdk_color_parse(Colore,&BaseColor);
 Style->base[GTK_STATE_NORMAL] = BaseColor;

here the compiler return me this error:
     " conversion from `int' to `enum GtkRcFlags'  "

 Style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_BASE;


 gtk_widget_modify_style(Widget,Style);
}

if I change the code and I write
Style->color_flags[GTK_STATE_NORMAL] = GTK_RC_FG;
Style->color_flags[GTK_STATE_NORMAL] = GTK_RC_BASE;

the program change only foreground color or base color

What I have to do?

Thanks

Johnny




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]