X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a0c9b3917093e27a895adbe9bf467917f5226ae..25b3661bd4cb44304418b93c0dee1d0dfb99765c:/wxPython/demo/MouseGestures.py?ds=sidebyside diff --git a/wxPython/demo/MouseGestures.py b/wxPython/demo/MouseGestures.py index 0374a0b336..d4af849020 100644 --- a/wxPython/demo/MouseGestures.py +++ b/wxPython/demo/MouseGestures.py @@ -1,6 +1,5 @@ #******************* #By Daniel Pozmanter -#Under the GPL, etc, etc. #Thanks to Robin Dunn for taking the time to show me how to do this #via the mailing list. @@ -9,7 +8,7 @@ #This is a hacked version of DragAndDrop.py from the wxPython demo 2.5.2.8 -import wx, wx.stc, wx.lib.dialogs +import wx, wx.lib.dialogs from wx.lib.gestures import MouseGestures #ToDo: @@ -32,7 +31,8 @@ class TestPanel(wx.Panel): #Mouse Gestures: - self.mg = MouseGestures(self, Auto=True) + self.mg = MouseGestures(self, Auto=True, + MouseButton=wx.MOUSE_BTN_RIGHT) self.mg.SetGesturesVisible(True) @@ -62,8 +62,6 @@ class TestPanel(wx.Panel): text.SetSize(wx.Size(w,h+1)) text.SetForegroundColour(wx.BLUE) - self.SetBackgroundColour(wx.WHITE) - #Sizer: outsideSizer = wx.BoxSizer(wx.VERTICAL) @@ -134,7 +132,8 @@ class TestPanel(wx.Panel): def OnChangeMouseButton(self, event): choices = [wx.MOUSE_BTN_LEFT, wx.MOUSE_BTN_MIDDLE, wx.MOUSE_BTN_RIGHT] schoices = ['Left', 'Middle', 'Right'] - d = wx.SingleChoiceDialog(self, "Set Mouse Button To", "Change Mouse Button", schoices, wx.OK|wx.CANCEL) + d = wx.SingleChoiceDialog(self, "Set Mouse Button To", "Change Mouse Button", schoices, + wx.CHOICEDLG_STYLE|wx.OK|wx.CANCEL) d.SetSize(wx.Size(250, 200)) answer = d.ShowModal() i = d.GetSelection()