[pygtk] pygtk, drawing area

John Finlay finlay at moeraki.com
Tue Nov 4 04:16:58 WST 2008


Tomáš Dohnálek wrote:
> Hello,
> i have some trouble with drawing area. I am actually not able to
> configure colours of lines and other object.
>
> self.gc.set_foreground(gtk.gdk.Color(10000,10000,60000))
> widget.window.draw_rectangle(self.gc, True, x*70, y*70, 70, 70)
>
> I thought that this will work fine, but the line is black.
>   
You need to allocate the color. see:

http://faq.pygtk.org/index.py?req=show&file=faq04.008.htp 
<http://faq.pygtk.org/index.py?req=show&file=faq04.008.htp>

John


More information about the pygtk mailing list