[pygtk] Trying to use style from custom widget

Mike Bernson mike at mlb.org
Sun Sep 24 08:33:58 WST 2006


Thanks that did the trick.

I have more more question

I would like to change the color of the text color on insensitve text.
Is there a way in gtkrc files to do this for all styles/themes. The
gray on gray is too hard to read. I want it to be black. I would like
to be able to tell the user a simple way to make this happen by
creating/edit the  .gtkrc. I just am not sure what need to be added so
it will override all styles. I do not like just override things as I
known I can hardcode it by changing the style object but that is bad bad
bad. Having the use modify there ~/.gtkrc file is the correct way to
handle it.

Is there a good text that talk about the gtkrc files.

Thomas Mills Hinkle wrote:
> 
>                     gtk.Widget.__init__(self)
>                     style = gtk.rc_get_style_by_paths (self.get_settings(),
>                             'GtkEntry', 'GtkEntry', gobject.TYPE_NONE)
> 
> 
> Using gtk.Entry instead of gobject.TYPE_NONE will get you a style
> object, but I'm not sure if that's what you want.
> 
> Tom
> 


More information about the pygtk mailing list