]> git.saurik.com Git - wxWidgets.git/commitdiff
test needed for wxGTK
authorRoman Rolinsky <rolinsky@femagsoft.com>
Fri, 4 May 2007 13:36:59 +0000 (13:36 +0000)
committerRoman Rolinsky <rolinsky@femagsoft.com>
Fri, 4 May 2007 13:36:59 +0000 (13:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/tools/XRCed/tools.py

index 42f5c7c1f8e1ad1ed73afec7d026c9dbf052ee76..d512ef7ba770bc61b37deb144ad277b930d253a2 100644 (file)
@@ -99,7 +99,9 @@ class Tools(wx.Panel):
                              wx.wxEVT_COMMAND_BUTTON_CLICKED, g.frame.OnCreate)
         wx.EVT_KEY_DOWN(self, self.OnKeyDown)
         wx.EVT_KEY_UP(self, self.OnKeyUp)
-        self.Bind(wx.EVT_LEFT_DOWN, self.OnClickBox)
+        # wxMSW does not generate click events for StaticBox
+        if wx.Platform == '__WXMSW__':
+            self.Bind(wx.EVT_LEFT_DOWN, self.OnClickBox)
 
         self.drag = None
 
@@ -161,11 +163,13 @@ class Tools(wx.Panel):
         if wx.Platform == '__WXMSW__':
             box = None
             for id,b in self.boxes.items():
-                # Detect click on label
+                # How to detect a click on a label?
                 if b.GetRect().Inside(evt.GetPosition()):
                     box = b
                     break
-            if not box: return
+            if not box: 
+                evt.Skip()
+                return
         else:
             box = self.boxes[evt.GetId()]
         # Collapse/restore static box, change label