Le 15/12/2008, "Frédéric" <[email protected]> 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:
gtk.rc_parse(gtkrcFileName)
screen = myMainWindow.get_screen()
settings = gtk.settings_get_for_screen(screen)
gtk.rc_reset_styles(settings)
--
Frédéric
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/