]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/MouseGestures.py
wxCheckListBox doesn't require wxUSE_OWNER_DRAWN when using WXUNIVERSAL
[wxWidgets.git] / wxPython / demo / MouseGestures.py
index 0374a0b336ef3ecff00b9ce6cd4de4b3c59be5bc..d4af8490209bec424d5ba6d1224838ea3055d45e 100644 (file)
@@ -1,6 +1,5 @@
 #*******************
 #By Daniel Pozmanter
 #*******************
 #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.
 
 #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
 
 
 #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:
 from wx.lib.gestures import MouseGestures
 
 #ToDo:
@@ -32,7 +31,8 @@ class TestPanel(wx.Panel):
 
         #Mouse Gestures:
     
 
         #Mouse Gestures:
     
-        self.mg = MouseGestures(self, Auto=True)
+        self.mg = MouseGestures(self, Auto=True,
+                                MouseButton=wx.MOUSE_BTN_RIGHT)
         
         self.mg.SetGesturesVisible(True)
         
         
         self.mg.SetGesturesVisible(True)
         
@@ -62,8 +62,6 @@ class TestPanel(wx.Panel):
         text.SetSize(wx.Size(w,h+1))
         text.SetForegroundColour(wx.BLUE)
         
         text.SetSize(wx.Size(w,h+1))
         text.SetForegroundColour(wx.BLUE)
         
-        self.SetBackgroundColour(wx.WHITE)
-        
         #Sizer:
         outsideSizer = wx.BoxSizer(wx.VERTICAL)
         
         #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']
     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()
         d.SetSize(wx.Size(250, 200))
         answer = d.ShowModal()
         i = d.GetSelection()