[pygtk] Change the appearance for all labels in a glade file
Chris Cole
ccole2 at mix.wvu.edu
Wed Oct 8 13:32:32 WST 2008
Patty Ackermann wrote:
> Hi,
>
> Is there a fast way to change the appearance of all the labels (using
> pango) in a glade file instead of doing it manually? I guess I am
> hinting at returning a list of widgets that are only labels and
> concatenating the pango markup.
If you want to easily return a list of widgets for manipulation, you can
easily do so by:
1. giving each widget a good "prefixed" name that makes sense
for what you are trying to accomplish
2. then...
widget_list = gtk.glade.get_widget_prefix("selector_prefix_goes_here")
3. for i in widget_list:
i.set_some_property_of_each_widget()
Or, maybe a better alternative would be to use rc files. Depends on what
you are trying to do. Hope this helps.
Chris
More information about the pygtk
mailing list