Re: [gtkmm] widgets & colors



Igor Jovanovic wrote:
Hi.

I can't find a way to change the background color for widgets, for
example some Toolbar or Entry widget. I can only change the color for
Label with markup styles.

Can anyone help me with this ?

Thanks.

Hello,
first, let me say that from an UI perspective, custom colors should never be used, as they are inconsistent with the rest of the users desktop.

You could either
a) define the color programmatically for each of your widgets using
   Gtk::Style, which has been covered in the past in this meiling list,
   or
b) set the name of each widget that you want to colorize, create a
   custom rc file defining the attributes of each widget, then in your
   programm use Gtk::RC::add_default_file("/path/to/rc/file")[1]; before
   instanciating(sp?) them to apply the given styles.

HTH,
Tassos

[1] of Gtk::RC::parse_string for that matter.




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