button.SetDefault() stops working after dialog

Hello,

I have a firmware programming GUI that consists of a bunch of text ctrls, file selectors, and 1 “Program” button. I set the program button as default using SetDefault(). This works when I first launch the application, pressing enters triggers the “Program” button.

After “Program” button is triggered, a progress dialog is started. When device programming is complete, I call Destroy() on the progress dialog then open a wx.MessageDialog to give the user the pass / fail results. The MessageDialog is shown using showModal().

After user clicks “OK” in the message dialog, program flow goes back to the main window. However, pressing Enter no longer triggers the “Program” button.

I’ve tried calling SetDefault() on the program button again after MessageDialog is closed but that does not seem to work. Any ideas?

You may need to set the focus back to the panel that holds the Program
button after the MessageDialog is closed.

···

On 18/09/2018 18:00, daniel d wrote:

Hello,

I have a firmware programming GUI that consists of a bunch of text
ctrls, file selectors, and 1 "Program" button. I set the program button
as default using SetDefault(). This works when I first launch the
application, pressing enters triggers the "Program" button.

After "Program" button is triggered, a progress dialog is started. When
device programming is complete, I call Destroy() on the progress dialog
then open a wx.MessageDialog to give the user the pass / fail results.
The MessageDialog is shown using showModal().

After user clicks "OK" in the message dialog, program flow goes back to
the main window. However, pressing Enter no longer triggers the
"Program" button.

I've tried calling SetDefault() on the program button again after
MessageDialog is closed but that does not seem to work. Any ideas?

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

---
This email has been checked for viruses by AVG.