Why would scrollbars in a ScrolledWindow appear or disappear depending on whether my DC is a self.dc or a dc? (The scrollbars appear when I resize the window, or when I scroll.) This is MacOS10.4.9, Intel Mac, Python 2.4
, wx.Python 2.8.4 .
I’ve attached a little script that shows this, the bottom line is this part:
def OnPaint(self, event):
dc = wx.PaintDC(self)
self.PrepareDC(dc)
#self.DoDrawingSelfDC(dc)
#self.DoDrawingSelfDC2(dc)
self.DoDrawingDC(dc)
def DoDrawingSelfDC(self, dc):
# No scrollbars
self.dc = dc
self.dc.BeginDrawing()
self.dc.SetPen
(wx.Pen(‘RED’))
self.dc.DrawRectangle(50, 50, 1500, 500)
self.dc.EndDrawing()
def DoDrawingSelfDC2(self, dc):
# No scrollbars
self.dc = dc
dc.BeginDrawing()
dc.SetPen(wx.Pen('RED'))
dc.DrawRectangle(50, 50, 1500, 500)
dc.EndDrawing()
def DoDrawingDC(self, dc):
# Scrollbars
dc.BeginDrawing()
dc.SetPen(wx.Pen('RED'))
dc.DrawRectangle(50, 50, 1500, 500)
dc.EndDrawing()
ScrolledWindow.py (1.26 KB)
···
–
Ian York (
iayork@iayork.com) <http://www.iayork.com/>
“-but as he was a York, I am rather inclined to suppose him a
very respectable Man.” -Jane Austen, The History of England