Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing the line color in gtk.DrawingArea

Status
Not open for further replies.

Bong

Programmer
Dec 22, 1999
2,063
US
Greeting.
I'm very new to Python. I'm using GTK to build an "attitude" visualization tool. I've got it working to my satisfaction but I would like to have the reference axes, the projections, and the target vector be different colors. Using the gtk.gdk.GC (graphics context object), that I have named "gc", I tried:
gc.set_foreground(gtk.gdk.parse_color("#ff0000")) but it doesn't work. By "doesn't work", I mean all the lines that are drawn with "gc" after that are still black.

Is there a trick?

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top