wxPython Merge #2 of 2.4 branch --> HEAD (branch tag: wxPy_2_4_merge_2)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -140,7 +140,7 @@ class PopButton(wxPyControl):
|
||||
# Tried to use wxPopupWindow but the control misbehaves on MSW
|
||||
class wxPopupDialog(wxDialog):
|
||||
def __init__(self,parent,content = None):
|
||||
wxDialog.__init__(self,parent,-1,'', style = wxSTAY_ON_TOP)
|
||||
wxDialog.__init__(self,parent,-1,'', style = wxBORDER_SIMPLE|wxSTAY_ON_TOP)
|
||||
|
||||
self.ctrl = parent
|
||||
self.win = wxWindow(self,-1,pos = wxPoint(0,0),style = 0)
|
||||
@@ -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()
|
||||
|
Reference in New Issue
Block a user