hatchek
February 24th, 2007, 01:11 AM
Hi, I'm having some difficulty working with the ToolButton widget.
What I want to do is create a new icon for a ToolButton based off of a new color.
I used the code:
img = gtk.Image()
img.set_from_file("foo.png")
aToolButton.set_icon_widget(img)
..to load a PNG as the icon, but I want to be able to use a gtk.gdk.Drawable() to create the icon on the fly, and then set that pixmap as the icon (basically, using the draw_rect, draw_line, draw_arc etc functions)
Any help?
What I want to do is create a new icon for a ToolButton based off of a new color.
I used the code:
img = gtk.Image()
img.set_from_file("foo.png")
aToolButton.set_icon_widget(img)
..to load a PNG as the icon, but I want to be able to use a gtk.gdk.Drawable() to create the icon on the fly, and then set that pixmap as the icon (basically, using the draw_rect, draw_line, draw_arc etc functions)
Any help?