According to this article , the events wx.EVT_SET_FOCUSand wx.EVT_KILL_FOCUSthat I expect from you are attached, do not start on the panel or frame, which contains widgets that themselves take focus.
wx.EVT_ACTIVATE , , . event, , .
, :
import wx
class MyFrame(wx.Frame):
def __init__(self, *args, **kwargs):
super(MyFrame, self).__init__(*args, **kwargs)
self.Bind(wx.EVT_ACTIVATE, self.on_focus)
def on_focus(self, evt):
self.Lower()
if __name__ == '__main__':
app = wx.App(False)
main_window = MyFrame(None)
main_window.Show()
app.MainLoop()
, , wx.EVT_ACTIVATE , - , . , ( ), , . , , , , .
share