button.SetDefault() stops working after dialog

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

button.SetDefault() stops working after dialog

daniel d
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 received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: button.SetDefault() stops working after dialog

GadgetSteve


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?
>
>
You may need to set the focus back to the panel that holds the Program
button after the MessageDialog is closed.

--
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.
https://www.avg.com

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.