re Radiobuttons conundrum

I’ve simplified it to show what is happening. Whenever radio button 3 is selected programatically (if there is such a word) it clears the first 2 radio buttons - which shouldn’t be affected. This doesn’t happen if it is done with the mouse or keyboard.

Sorry about the multiple versions - this is the easiest so far to see the undesirable behaviour.

This radio button is always selected when it first starts up as well - for no apparent reason.

Chris.

RadioButtons3.py (3.93 KB)

Chris Munchenberg wrote:

I've simplified it to show what is happening. Whenever radio button 3 is selected programatically (if there is such a word) it clears the first 2 radio buttons - which shouldn't be affected. This doesn't happen if it is done with the mouse or keyboard.
Sorry about the multiple versions - this is the easiest so far to see the undesirable behaviour.
This radio button is always selected when it first starts up as well - for no apparent reason.

I think you would be better off using wxCheckBox and managing the single select behavior yourself, because allowing no radio buttons to be selected is a platform specific quirk. But regardless of that, to get multiple groups of wxRadiouButtons to work correctly on wxMSW you have to create some non-wxRadioButton control between creating the groups of wxRadioButtons.

···

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

Ah! If only life were simple…

Following Robin’s inspired lead, even a simple horizontal line between the radio buttons invokes expected behaviour.

Forget Mike, I want to be like Robin.

···

----- Original Message -----
From: Robin Dunn

To: wxPython-users@lists.wxwindows.org

Sent: Tuesday, January 28, 2003 5:48 AM

Subject: Re: [wxPython-users] Re: re Radiobuttons conundrum

Chris Munchenberg wrote:

I’ve simplified it to show what is happening. Whenever radio button 3 is
selected programatically (if there is such a word) it clears the first 2
radio buttons - which shouldn’t be affected. This doesn’t happen if it
is done with the mouse or keyboard.

Sorry about the multiple versions - this is the easiest so far to see
the undesirable behaviour.

This radio button is always selected when it first starts up as well -
for no apparent reason.

I think you would be better off using wxCheckBox and managing the single
select behavior yourself, because allowing no radio buttons to be
selected is a platform specific quirk. But regardless of that, to get
multiple groups of wxRadiouButtons to work correctly on wxMSW you have
to create some non-wxRadioButton control between creating the groups of
wxRadioButtons.


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


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org