[pygtk] Changing a style property of TreeView
Aravind Vijayakumar
iamfenris at yahoo.com
Fri Mar 21 01:12:37 WST 2008
Now that I do have the code in front of me, what I has done was:
gtk.rc_reset_styles(self.main_window.get_settings())
You'd want to replace self.main_window with the appropriate widget.
Regards,
Aravind
----- Original Message ----
From: Aravind Vijayakumar <iamfenris at yahoo.com>
To: jeff_barish at earthlink.net; pygtk at daa.com.au
Sent: Thursday, March 20, 2008 12:38:06 AM
Subject: Re: [pygtk] Changing a style property of TreeView
HI Jeffrey,
I recently ran into something similar, I don't have the code in front of me, but I had to do something like:
gtk.rc_reset_styles(gtk.settings_get_default())
after I had done the rc_parse_string for the changes to take effect.
References:
http://www.pygtk.org/docs/pygtk/class-gtksettings.html#function-gtk--settings-get-default
http://www.pygtk.org/docs/pygtk/class-gtkrcstyle.html#function-gtk--rc-reset-styles
Hope that helps,
Aravind
----- Original Message ----
From: Jeffrey Barish <jeff_barish at earthlink.net>
To: pygtk at daa.com.au
Sent: Wednesday, March 19, 2008 6:01:16 AM
Subject: [pygtk] Changing a style property of TreeView
I would like to change the style property indent-expanders of a TreeView.
Following the example of FAQ 4.18, I put the code:
rcstring = """
style "treeview-style" {
GtkTreeView::indent_expanders = 0
}
class "GtkTreeView" style "treeview-style"
"""
gtk.rc_parse_string(rcstring)
at the top of the module. I do not get an error message, but when I do
print treeview.style_get_property('indent-expanders')
at the point in the code where I create the treeview, the value is still
True. I don't really understand the explanation in FAQ 4.18, so no doubt I
am doing something stupid. Anyone know what?
--
Jeffrey Barish
_______________________________________________
pygtk mailing list pygtk at daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
_______________________________________________
pygtk mailing list pygtk at daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
More information about the pygtk
mailing list