I want to change the color of the progress bar of the Gtk.Entry
widget but am unable to do so by using Gtk.Widget.override_color()
. How can I do this?
Asked
Active
Viewed 1,889 times
0

Dhara
- 6,587
- 2
- 31
- 46

Akshay Dixi
- 3
- 2
1 Answers
1
In pygtk, you have to override the GtkStyle
of the widget. In the case of the GtkProgressBar
the color of the bar is determined by the bg
attribute's Gtk.STATE_PRELIGHT
of its style component. Source
So you could do something like:
progress_bar.modify_bg(gtk.STATE_PRELIGHT, gtk.gdk.color_parse("blue"))
I'm sure something similar can be applied in PyGObject.
Note: You are overriding style settings in Gtk which should be avoided. Styles and themes should be left up to the end user for their own personal tastes.

Wes
- 954
- 13
- 25