Single group of RadioButton over multiple Panels

17 views
Skip to first unread message

David Wende

unread,
Sep 4, 2016, 2:44:26 AM9/4/16
to wxPython-users
Hi all

I have several panels (within a multiple splitter layout) and I need to have a RadioButton in each panel, but with all in a GROUP (select only single from the group).
First RB is set with style wx.RB_GROUP and others with wx.RB_SINGLE but each RB is still behaving as if it was in its own group.

Is my desired behavior possible at all, and does anyone know who to do it?

Thanks
David

Dietmar Schwertberger

unread,
Sep 4, 2016, 3:07:39 AM9/4/16
to wxpytho...@googlegroups.com, david...@gmail.com
RB_SINGLE always results in a standalone button. Just start the group with RB_GROUP and add the other buttons with the default style.
I would not expect that to work anyway in your case, so you may have to implement the selections yourself.

From the documentation:
  • wxRB_GROUP:
    Marks the beginning of a new group of radio buttons.
  • wxRB_SINGLE:
    In some circumstances, radio buttons that are not consecutive siblings trigger a hang bug in Windows (only). If this happens, add this style to mark the button as not belonging to a group, and implement the mutually-exclusive group behaviour yourself.

Regards,

Dietmar

David Wende

unread,
Sep 4, 2016, 3:10:33 AM9/4/16
to wxPython-users, david...@gmail.com, mail...@schwertberger.de
Hi Dietmar

I tried your suggestion of not using style at all on the others, but this does not help.
David
Reply all
Reply to author
Forward
0 new messages