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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Bob Klahn
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?

--
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
|  
Report Content as Inappropriate

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

Tim Roberts
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, [hidden email]
Providenza & Boekelheide, Inc.

--
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
|  
Report Content as Inappropriate

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

GadgetSteve
In reply to this post by Bob Klahn


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?
>

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)

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

--
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
|  
Report Content as Inappropriate

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

Bob Klahn
In reply to this post by Tim Roberts
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.
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.


--
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.

radioBtns.py (3K) Download Attachment
Loading...