InterviewSolution
| 1. |
Why Don't My Style Changes Apply Only To The Widget I Requested It From? |
|
Answer» RICARDO Lenzi writes: get_style() returns an object what aways have the current style of widget. If you WANT to save an static style, use get_style().COPY() instead: style = widget.get_style().copy() This has some pretty odd effects. If you are CREATING a WINDOW with many gtk.Label's, for instance, and you alter the actual style object (not a copy() if it), all widgets will eventually change style (when they are redrawn by GTK+). Ricardo Lenzi writes: get_style() returns an object what aways have the current style of widget. If you want to save an static style, use get_style().copy() instead: style = widget.get_style().copy() This has some pretty odd effects. If you are creating a window with many gtk.Label's, for instance, and you alter the actual style object (not a copy() if it), all widgets will eventually change style (when they are redrawn by GTK+). |
|