Improve radio button groups documentation
Explain the role of wxRB_SINGLE better, it's useful not only for avoiding wxMSW bugs (which, besides, shouldn't exist any more).
This commit is contained in:
@@ -12,20 +12,28 @@
|
|||||||
mutually exclusive options. It has a text label next to a (usually) round
|
mutually exclusive options. It has a text label next to a (usually) round
|
||||||
button.
|
button.
|
||||||
|
|
||||||
You can create a group of mutually-exclusive radio buttons by specifying
|
Radio buttons are typically used in groups of mutually-exclusive buttons,
|
||||||
@c wxRB_GROUP for the first in the group. The group ends when another
|
i.e. exactly one of the buttons in the group is checked, and the other ones
|
||||||
radio button group is created, or there are no more radio buttons. You can navigate
|
are unchecked automatically. Such groups are created implicitly, but can
|
||||||
among the items in a group with @see GetFirstInGroup(), GetPreviousInGroup(), GetNextInGroup(), GetLastInGroup()
|
also be started explicitly by using @c wxRB_GROUP style: a button with this
|
||||||
|
style starts a new group and will become the initial selection in this
|
||||||
|
group. Alternatively, a radio button may be excluded from the group that it
|
||||||
|
would otherwise belong to by using @c wxRB_SINGLE style.
|
||||||
|
|
||||||
|
To find the other elements of the same radio button group, you can use
|
||||||
|
GetFirstInGroup(), GetPreviousInGroup(), GetNextInGroup() and
|
||||||
|
GetLastInGroup() functions.
|
||||||
|
|
||||||
|
|
||||||
@beginStyleTable
|
@beginStyleTable
|
||||||
@style{wxRB_GROUP}
|
@style{wxRB_GROUP}
|
||||||
Marks the beginning of a new group of radio buttons.
|
Marks the beginning of a new group of radio buttons.
|
||||||
@style{wxRB_SINGLE}
|
@style{wxRB_SINGLE}
|
||||||
In some circumstances, radio buttons that are not consecutive
|
Creates a radio button which is not part of any radio button group.
|
||||||
siblings trigger a hang bug in Windows (only). If this happens, add
|
When this style is used, no other radio buttons will be turned off
|
||||||
this style to mark the button as not belonging to a group, and
|
automatically when this button is turned on and such behaviour will
|
||||||
implement the mutually-exclusive group behaviour yourself.
|
need to be implemented manually, in the event handler for this
|
||||||
|
button.
|
||||||
@endStyleTable
|
@endStyleTable
|
||||||
|
|
||||||
@beginEventEmissionTable{wxCommandEvent}
|
@beginEventEmissionTable{wxCommandEvent}
|
||||||
|
Reference in New Issue
Block a user