If I add multiple trait controls to an existent wx gui and I run the program I click on one text edit and start typing but then my key inputs are somehow "captured" by that text edit. Even if I click elsewhere, e.g. on the other text edit, my key input is only received from the text edit I clicked first.
Does someone understand what is going wrong there and how I can avoid that behavior?
Here is my code:
class Config(HasTraits):
value = Float(0.0)
class Gui(object):
def __init__(self, title):
app = wx.App()
window = wx.Frame(None, wx.ID_ANY, title)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(Config().edit_traits(parent=window, kind='subpanel').control)
sizer.Add(Config().edit_traits(parent=window, kind='subpanel').control)
window.SetSizer(sizer)
window.Fit()
window.Show()
app.MainLoop()
if __name__ == "__main__":
Gui()