Re: dateedit color change problem...



vyadav cdotd ernet in wrote:

hi..
      how we can change the color of date edit component.


  i tried like it->

     gdk_color_parse ("light green", &color);
 style_default=gtk_widget_get_default_style();
 style=gtk_style_copy(style_default);
 style->base[GTK_STATE_NORMAL] = color;
 gtk_widget_set_style(dateedit1,style);

 but color of widget didn't change.
 then  whats the solution of it.

Use gtk_widget_modify_bg (also take a look at gtk_widget_modify_*() functions):
---
   gdk_color_parse ("light green", &color);
   gtk_widget_modify_bg(dateedit1, GTK_STATE_NORMAL, &color);
---

Olexiy





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