[wxpython-users] Can a group of radio buttons be used as a one-click selection ?

Stef Mientki s.mientki at ru.nl
Sat May 10 01:37:11 PDT 2008


hi Che,

C M wrote:
> On Fri, May 9, 2008 at 8:44 PM, Stef Mientki <s.mientki at ru.nl> wrote:
>   
>> hello,
>>
>> I want a group of radio buttons,
>> where clicking on one of the buttons,
>> should perform some action.
>> Now this works as long as I don't select the same (already selected)
>> Radiobutton.
>>     
>
> First, just a contention:  What would be the (visual) logic of
> clicking something that is already selected?  Wouldn't the state of
> your GUI/app be as that radioButton indicates already?  If others are
> to use this, I would argue that users might think this way too (or you
> could argue that this is a good paradigm switch!).
>   
Yes, the program I'm working on is a windows mobile emulator,
and on windows mobile.
 a click on an already selected item has effect
(which is indeed an improvement for those devices).
> But it should work if you call event.Skip() to allow the button to
> "popped" after you tell it to perform some action.  Maybe you were
> leaving that out?  See a working sample attached.
>   
Thanks,
that was indeed the problem
( I didn't know that EVT_LEFT_DOWN could block the EVT_RADIOBUTTON)

cheers,
Stef


More information about the wxpython-users mailing list