The RadioButton demo -- how to prevent focus on a button's static text?

When I bring up the RadioButton demo (under "Core Windows/Controls"), it works the way I need it to: selecting a radio button puts the focus on that button's =editable= text field.

But when I switch away from the demo, e.g., to my web browser, then switch back to the demo, now selecting a radio button puts the focus on that button's =static= text.

To me, this is a flaw in the demo itself. How can the demo code be modified to eliminate the static-text focus problem?

Bob Klahn wrote:

When I bring up the RadioButton demo (under "Core Windows/Controls"), it
works the way I need it to: selecting a radio button puts the focus on
that button's =editable= text field.

It doesn't do that for me on Windows. The focus always stays on the
button itself. Frankly, that's what I'd expect - I just clicked on the
button, so it should have focus. That text field is not part of the
button in any way.

What operating system are you on? I'm Wx 3.0.3 on Python 3.4 on Windows 10.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

A little bit more information would be helpful, i.e. which versions of:

Python: (32/64 Bit)
wxPython: (Classic/Phoenix)
Demo:
OS: (32/64 Bit)

···

On 07/04/2017 16:16, Bob Klahn wrote:

When I bring up the RadioButton demo (under "Core Windows/Controls"), it
works the way I need it to: selecting a radio button puts the focus on
that button's =editable= text field.

But when I switch away from the demo, e.g., to my web browser, then
switch back to the demo, now selecting a radio button puts the focus on
that button's =static= text.

To me, this is a flaw in the demo itself. How can the demo code be
modified to eliminate the static-text focus problem?

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

Windows 7, 64-bit
Python 2.7.13
wxPython "3.0.2.0 msw (classic)"

Since posting my note above, I've found a workaround: I've blanked the radio-button labels and added a wx.StaticText control to each row with what was the label text.
A stripped-down version of the demo implementing my workaround is attached.

Any comments? I'm all ears.

radioBtns.py (2.19 KB)

···

On 4/7/2017 12:43 PM, Tim Roberts wrote:

Bob Klahn wrote:

When I bring up the RadioButton demo (under "Core Windows/Controls"), it
works the way I need it to: selecting a radio button puts the focus on
that button's =editable= text field.

It doesn't do that for me on Windows. The focus always stays on the
button itself. Frankly, that's what I'd expect - I just clicked on the
button, so it should have focus. That text field is not part of the
button in any way.

What operating system are you on? I'm Wx 3.0.3 on Python 3.4 on Windows 10.