X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0af45411b9d08118f2a599427de2092c3f7972f2..b9ecc16a80cf3acb5f2b2d809623b56452900dab:/wxPython/demo/wxScrolledWindow.py diff --git a/wxPython/demo/wxScrolledWindow.py b/wxPython/demo/wxScrolledWindow.py index 31a388a11e..e0ad207b73 100644 --- a/wxPython/demo/wxScrolledWindow.py +++ b/wxPython/demo/wxScrolledWindow.py @@ -39,6 +39,7 @@ class MyCanvas(wxScrolledWindow): EVT_LEFT_UP(self, self.OnLeftButtonEvent) EVT_MOTION(self, self.OnLeftButtonEvent) EVT_PAINT(self, self.OnPaint) + ##EVT_MOUSEWHEEL(self, self.OnWheel) def getWidth(self): @@ -109,7 +110,8 @@ class MyCanvas(wxScrolledWindow): for style in [wxDOT, wxLONG_DASH, wxSHORT_DASH, wxDOT_DASH, wxUSER_DASH]: pen = wxPen("DARK ORCHID", 1, style) if style == wxUSER_DASH: - pen.SetDashes([1, 2, 3, 4, 5, 6, 7, 8]) + pen.SetCap(wxCAP_BUTT) + pen.SetDashes([1,2]) pen.SetColour("RED") dc.SetPen(pen) dc.DrawLine(300, y, 400, y) @@ -188,6 +190,7 @@ class MyCanvas(wxScrolledWindow): ## delta = evt.GetWheelDelta() ## rot = evt.GetWheelRotation() ## linesPer = evt.GetLinesPerAction() +## print delta, rot, linesPer ## ws = self.wheelScroll ## ws = ws + rot ## lines = ws / delta @@ -211,13 +214,14 @@ def runTest(frame, nb, log): +overview = """\ +""" +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])]) - - - -overview = """\ -"""