Are you printing the clipping rect to make sure it isn't empty?
What is on the window? Remember that WM_ERASEBACKGND is always sent
immediately before a WM_PAINT. If the contents of your window
completely cover the inside area, then nothing of the gradient will show
through.
···
On Thu, 10 Aug 2006 22:17:08 +0100, "Davy Mitchell" <daftspaniel@gmail.com> wrote:
I am having trouble with GradientFillLinear (WX2.7).
def OnEraseBackground(self, evt):
dc = evt.GetDC()
if not dc:
dc = wxClientDC(self)
rect = self.GetUpdateRegion().GetBox()
dc.SetClippingRect(rect)
dc.GradientFillLinear(self.GetRect(),wxColour(23, 23,
23),wxColour(255, 255, 255))
print "pop"
print self.GetRect()Nothing appears to be drawn though the function is called and the rect
area seems valid. Sorry if I am missing something obvious!!
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.