[pygtk] Using draw_rectangle with a fill colour

2011-03-01 Thread mercado
Hello all, I am trying to use gtk.DrawingArea to draw an orange rectangle, using some of the information at http://www.pygtk.org/pygtk2tutorial/ch-DrawingArea.html. I have included a sample of my code below, which draws a black rectangle. However, I cannot get it to accept the color information

Re: [pygtk] Using draw_rectangle with a fill colour

2011-03-01 Thread Timo
On 01-03-11 15:20, mercado wrote: Hello all, I am trying to use gtk.DrawingArea to draw an orange rectangle, using some of the information at http://www.pygtk.org/pygtk2tutorial/ch-DrawingArea.html. I have included a sample of my code below, which draws a black rectangle. However, I cannot

Re: [pygtk] Using draw_rectangle with a fill colour

2011-03-01 Thread mercado
On Tue, Mar 1, 2011 at 11:56 AM, Timo timomli...@gmail.com wrote:         gc.foreground = gtk.gdk.color_parse(orange) Try the following line instead:        gc.set_foreground(self.get_colormap().alloc_color(#FF8000)) Cheers, Timo Yes, that works. Thanks for your help Timo.