gtk.RadioButton Style Propertiesgtk.Widget Style Propertiesgtk.Button Style Propertiesgtk.CheckButton Style Propertiesgtk.RadioButton Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypesgtk.Container Signal Prototypesgtk.Button Signal Prototypesgtk.ToggleButton Signal Prototypes"group-changed"callbackradiobuttonuser_param1...DescriptionA single gtk.RadioButton
performs the same basic function as a gtk.CheckButton,
as it's position in the object hierarchy reflects. It is only when multiple
radio buttons are grouped together that they become a different user
interface component in their own right. Every radio button is a member of
some group of radio buttons. When one is selected, all other radio buttons
in the same group are deselected. A gtk.RadioButton
is used to give the user a choice of one of many options.Radio button widgets are created with gtk.RadioButton() passing
None as the group (first) argument
if this is the first radio button in a group. In subsequent calls, pass a
reference to a gtk.RadioButton
as the first argument to specify the group. The second (optional) argument
to gtk.RadioButton() is a
label that is used to specify the text of the button. The label text is
parsed for mnemonic characters (preceded by an underscore) to specify an
accelerator for the radiobutton. See gtk.AccelGroup
and gtk.AccelLabel
for more information on mnemonic accelerators.To retrieve the group a gtk.RadioButton
is assigned to, use the get_group()
method. To remove a gtk.RadioButton
from one group and make it part of a new one, use the set_group()
method.Constructorgtk.RadioButtongroupNonelabelNoneuse_underlineTruegroup :an existing gtk.RadioButton
or Nonelabel :a string to use as the button text or
Noneuse_underline :if True, an underscore in the
label text indicates the next character should be underlined and used for the
mnemonic accelerator key if it is the first character so
marked. Available in PyGTK 2.4 and above.Returns :a new gtk.RadioButton
widgetCreates a new gtk.RadioButton
widget with the label text specified by label, adding
it to the same group as group.
label is parsed for underscore characters that
indicate mnemonic accelerators. If label is
None, no label is created. If
group is None, the new radiobutton
becomes the first member of a new radiobutton group.In PyGTK 2.4 and above the use_underline
parameter is available and defaults to True. If
use_underline is set to False the
label text will not be parsed for mnemonic characters.Methodsgtk.RadioButton.get_groupget_groupReturns :the list of radiobuttons in the same group that
contains the radiobutton or NoneThe get_group() method returns the list
of radiobuttons that are in the same group as the radiobutton or
None if the radiobutton is not in a group.gtk.RadioButton.set_groupset_groupgroupgroup :a gtk.RadioButton
whose group the radiobutton will be added to or
NoneThe set_group() method adds the
radiobutton to the group of the radiobutton specified by
group.In PyGTK 2.6.2 and above, if group is
None the radiobutton is removed from its current
group.SignalsThe "group-changed" gtk.RadioButton Signalcallbackradiobuttonuser_param1...radiobutton :the radiobutton that received the
signaluser_param1 :the first user parameter (if any) specified
with the connect()
method... :additional user parameters (if
any)This signal is available in GTK+ 2.4 and above.The "group-changed" signal is emitted when a gtk.RadioButton
is added to or removed from the group.