My versions of software are:
Fedora 11, Glade 3.6.1, PyGTK 2.14.1, GTK 2.16.1
Windows XP, Glade 3.6.7, PyGTK 2.12.1, GTK 2.16.4)
The code that works on Fedora 11 and not on XP looks like this for the toggle button handler:
def on_togglebutton_toggled(self, widget, data="">
map = widget.get_colormap()
color_off = map.alloc_color("red")
color_on = map.alloc_color("green")
labeltxt = widget.get_label()
if labeltxt == '1':
widget.set_label('0')
widget.modify_bg(gtk.STATE_NORMAL, color_off)
else:
widget.set_label('1')
widget.modify_bg(gtk.STATE_ACTIVE, color_on)
I have read the various PyGTK FAQ articles and tried copying the button's style, modifying it, and doing a set style; as well as using an enventbox, which only served to color the eventbox around the button, not the button itself.
So is this something that cannot be done under XP? Or requires a completely different approach?
Thanks
E.R. Uber
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list
- Prev by Date: Request for comments: gwebd and gtkwebd
- Next by Date: GTK default theme over-rides the theme set for the application.
- Previous by thread: Request for comments: gwebd and gtkwebd
- Next by thread: GTK default theme over-rides the theme set for the application.
- Index(es):