[wxPython] Frame without control focus

Hello,
I have a child frame (specifically, a wxMDIChildFrame, on wxPython 2.3.3.1
Windows), and it has some controls, and as normal, when it is created, the
focus is set to the first input control it contains.

I'd like instead for whenever the frame recieves focus, that no control
should have focus.

What is the best way to do so?

lipid@68k.org wrote:

Hello,
I have a child frame (specifically, a wxMDIChildFrame, on wxPython 2.3.3.1
Windows), and it has some controls, and as normal, when it is created, the
focus is set to the first input control it contains.

I'd like instead for whenever the frame recieves focus, that no control
should have focus.

What is the best way to do so?

You might be able to do something in an EVT_ACTIVATE handler but I'm not sure what. Normally the focus has to be somewhere, perhaps you can have a control on the frame that is not visible (at position -100,-100 or something) and set the focus to it.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!