[pygtk] Gtkrc styles

Frédéric frederic.mantegazza at gbiloba.org
Mon Dec 15 21:52:28 WST 2008

Le 15/12/2008, "Frédéric" <frederic.mantegazza at gbiloba.org> a écrit:

>1) I would like to dynamically load a gtkrc file, using
>gtk.rc_parse(<file>), and have the styles contained in this file
>immediatly applied to my entire application. But it does not work: only
>widget which have not yet been realized get the new styles (sub-dialogs,
>or menus which haven't been opened before the call to rc_parse()
>method). Is there a way to re-realize all widgets?

Ok, I found the answer of this question:

    screen = myMainWindow.get_screen()
    settings = gtk.settings_get_for_screen(screen)


More information about the pygtk mailing list