test needed for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -99,6 +99,8 @@ class Tools(wx.Panel):
|
|||||||
wx.wxEVT_COMMAND_BUTTON_CLICKED, g.frame.OnCreate)
|
wx.wxEVT_COMMAND_BUTTON_CLICKED, g.frame.OnCreate)
|
||||||
wx.EVT_KEY_DOWN(self, self.OnKeyDown)
|
wx.EVT_KEY_DOWN(self, self.OnKeyDown)
|
||||||
wx.EVT_KEY_UP(self, self.OnKeyUp)
|
wx.EVT_KEY_UP(self, self.OnKeyUp)
|
||||||
|
# wxMSW does not generate click events for StaticBox
|
||||||
|
if wx.Platform == '__WXMSW__':
|
||||||
self.Bind(wx.EVT_LEFT_DOWN, self.OnClickBox)
|
self.Bind(wx.EVT_LEFT_DOWN, self.OnClickBox)
|
||||||
|
|
||||||
self.drag = None
|
self.drag = None
|
||||||
@@ -161,11 +163,13 @@ class Tools(wx.Panel):
|
|||||||
if wx.Platform == '__WXMSW__':
|
if wx.Platform == '__WXMSW__':
|
||||||
box = None
|
box = None
|
||||||
for id,b in self.boxes.items():
|
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()):
|
if b.GetRect().Inside(evt.GetPosition()):
|
||||||
box = b
|
box = b
|
||||||
break
|
break
|
||||||
if not box: return
|
if not box:
|
||||||
|
evt.Skip()
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
box = self.boxes[evt.GetId()]
|
box = self.boxes[evt.GetId()]
|
||||||
# Collapse/restore static box, change label
|
# Collapse/restore static box, change label
|
||||||
|
Reference in New Issue
Block a user