Hi All,
I'm updating from wxPython 2.4.2.4 to 2.8.3.0. I had a function that drew on the screen based on mouse movement. In trying to narrow down my problem I starting modifying the wxPython demo (an excellent addition). My window happened to be a GLCanvas so I tried drawing lines in there and everything worked ok - lines drew with proper size and color of the current pen (my app was showing white lines). I then tried drawing on top of the TextCtrl demo and the pen is the right width but the pen color is always white (unless INVERT is used then it's black) like mine. Is there a trick about what the parent of the window is that forces the drawing to monochrome?
I modified the TextCtrl sample with the following (it shows up when you type in the top text control).
def EvtChar(self, event):
self.log.WriteText('EvtChar: %d\n' % event.GetKeyCode())
dc=wx.ClientDC(self) #wx.WindowDC(self)
#dc.SetPen(wx.Pen('red',3))
dc.SetPen(wx.Pen(wx.Color(0,0,255),5))
dc.SetLogicalFunction(wx.SET) #wx.INVERT)
dc.DrawLine(0,0,100,100) #why is this coming up white?
dc.DrawLine(0,100,100,0)
dc.SetPen(wx.NullPen)
event.Skip()
Thanks in advance.