X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7403ad2d154a8e2974fdc5fc215258f3a75cdde..628eae0bcd7916c57847b7eab739d4cc32534ccf:/wxPython/demo/ScrolledWindow.py diff --git a/wxPython/demo/ScrolledWindow.py b/wxPython/demo/ScrolledWindow.py index 153ceab617..ac36542551 100644 --- a/wxPython/demo/ScrolledWindow.py +++ b/wxPython/demo/ScrolledWindow.py @@ -24,7 +24,8 @@ class MyCanvas(wx.ScrolledWindow): bmp.SetMask(mask) self.bmp = bmp - self.SetScrollbars(20, 20, self.maxWidth/20, self.maxHeight/20) + self.SetVirtualSize((self.maxWidth, self.maxHeight)) + self.SetScrollRate(20,20) if BUFFERED: # Initialize the buffer bitmap. No real DC is needed at this point. @@ -53,7 +54,7 @@ class MyCanvas(wx.ScrolledWindow): # wx.PaintDC and then blit the bitmap to it when dc is # deleted. Since we don't need to draw anything else # here that's all there is to it. - dc = wx.BufferedPaintDC(self, self.buffer) + dc = wx.BufferedPaintDC(self, self.buffer, wx.BUFFER_VIRTUAL_AREA) else: dc = wx.PaintDC(self) self.PrepareDC(dc)