From c8ad57a77ab8df4bb376b92b00eda9e4da8ea20d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 20 May 2003 18:26:47 +0000 Subject: [PATCH] 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 --- wxPython/wxPython/lib/popupctl.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wxPython/wxPython/lib/popupctl.py b/wxPython/wxPython/lib/popupctl.py index c7609edd1b..76dfc6de19 100644 --- a/wxPython/wxPython/lib/popupctl.py +++ b/wxPython/wxPython/lib/popupctl.py @@ -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()