Ensure that the focus gets redirected to the embedded control

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-05-20 18:26:47 +00:00
parent ff5bb76716
commit c8ad57a77a

View File

@@ -197,6 +197,12 @@ class wxPopupControl(wxPyControl):
EVT_SIZE(self,self.OnSize)
EVT_BUTTON(self.bCtrl,self.bCtrl.GetId(),self.OnButton)
# embedded control should get focus on TAB keypress
EVT_SET_FOCUS(self,self.OnFocus)
def OnFocus(self,evt):
self.textCtrl.SetFocus()
evt.Skip()
def OnSize(self,evt):
w,h = self.GetClientSizeTuple()