Force shipbrowser focus when clicking on trackbar or inside it

This commit is contained in:
HomeWorld
2010-12-09 00:37:55 +02:00
parent 059c0fd1c6
commit bc38b225d4
2 changed files with 9 additions and 2 deletions

View File

@@ -36,6 +36,13 @@ class PFListPane(wx.ScrolledWindow):
self.Bind(wx.EVT_SCROLLWIN_LINEUP, self.MScrollUp)
self.Bind(wx.EVT_SCROLLWIN_LINEDOWN, self.MScrollDown)
self.Bind(wx.EVT_CHILD_FOCUS, self.OnChildFocus)
self.Bind(wx.EVT_LEFT_DOWN, self.ForceFocus)
self.Bind(wx.EVT_MOUSE_CAPTURE_CHANGED, self.ForceFocus)
def ForceFocus(self,event):
if self.FindFocus().Parent != self:
self.SetFocus()
event.Skip()
def OnChildFocus(self, event):
event.Skip()