[pygtk] How to get default colours in Gtk 3?

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Mar 22 14:29:30 WST 2011


With Gtk 2 I was using the following technique to find out
the default foreground and background colours for a selection:

from gtk import Style
s = Style()
foreground = s.fg[3]
background = s.bg[3]

However, with Gtk 3 via gi, s.fg is coming up as an empty
list.

Can anyone suggest an alternative way of going about this?

Thanks,
Greg




More information about the pygtk mailing list