[GTK3] get background color of a textview
- From: Yann Leboulanger <asterix lagaule org>
- To: gtk-list <gtk-list gnome org>
- Subject: [GTK3] get background color of a textview
- Date: Wed, 31 Jul 2013 14:23:47 +0200
Hi,
I'm trying to get the background color of a textview. I use python /
pygobject, but I don't think it's related to the language.
I tried doing that:
context = textview.get_style_context()
state = Gtk.StateFlags.NORMAL
color = context.get_background_color(state)
I tried all possible states, but none returns the correct background
color (white in my case)
I precise that textview is already realized, this code is done in a
callback.
Any idea how to get it?
Thanks in advance,
--
Yann
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]