Dialog lacking focus

I am having a non-repeatable problem.
Once in a while when a modal dialog is called it takes longer than usual to appear (machine busy maybe).
When the dialog appears it doesn’t have focus. As it is a text entry dialog this is a nuisance (and with the current windows 10 default colour scheme it is not immediately apparent).
Any ideas anyone?

Hi, floatingshed

Wx.EVT_SHOW event can be used to give the focus to the text field when it is shown on the screen as follows:

        def on_show(evt):
        self.Bind(wx.EVT_SHOW, on_show)

I hope this helps you.

Thanks, at first I thought it had fixed the problem, but no :slightly_frowning_face: