On 09/17/2013 07:31 AM, Ed Leafe wrote:
On Sep 17, 2013, at 9:27 AM, John Fabiani <[email protected]> wrote:

def onPaint(self, evt):
  #trying to simulate the MS windows gradient background
        dc = wx.PaintDC(self)
        x = 0
        y = 0
        w, h = self.GetSize()
        dc.GradientFillLinear((x, y, w, h), 'light blue',wx.Color(0, 100, 254), 
1)
What is the advantage of this over the included drawGradient() method?

-- Ed Leafe


Hi Ed,
None that I could see. Of course I did not benchmark the routines. I used wx.onPaint because I was hoping I'd get a different result and that it would allow a dynamic color change as I resized the form. I guess getting at a lower direct level seemed to be a better plan.

Johnf
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to