gtk.RadioMenuItem
Prev | The gtk Class Reference | Next

## gtk.RadioMenuItem

gtk.RadioMenuItem — a choice from multiple check menu items.

## Synopsis

    class gtk.RadioMenuItem(gtk.CheckMenuItem):
        gtk.RadioMenuItem(group=None, label=None, use_underline=True)
        def get_group()
        def set_group(group)

## Ancestry

    +-- gobject.GObject
      +-- gtk.Object
        +-- gtk.Widget
          +-- gtk.Container
            +-- gtk.Bin
              +-- gtk.Item
                +-- gtk.MenuItem
                  +-- gtk.CheckMenuItem
                    +-- gtk.RadioMenuItem

## Implemented Interfaces

`gtk.RadioMenuItem` implements `gtk.Buildable`

## gtk.RadioMenuItem Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

gtk.CheckMenuItem Properties

"group" | Write | The radio menu item whose group this widget belongs to. This property is available in GTK+ 2.8 and above.

## gtk.RadioMenuItem Style Properties

gtk.Widget Style Properties

gtk.MenuItem Style Properties

gtk.CheckMenuItem Style Properties

## gtk.RadioMenuItem Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

gtk.Container Signal Prototypes

gtk.Item Signal Prototypes

gtk.MenuItem Signal Prototypes

gtk.CheckMenuItem Signal Prototypes

"group-changed" | `def callback(`radiomenuitem`, `user_param1`, `...`)`

## Description

A `gtk.RadioMenuItem` widget is a check menu item that belongs to a group. Only one of the radio menu items in a group can be selected.

## Constructor

        gtk.RadioMenuItem(group=None, label=None, use_underline=True)

`group` : | a `gtk.RadioMenuItem` whose group the new radiomenuitem should be added to, or `None` if a new group should be created
`label` : | a string to be used as the label text or `None` if no label is needed
`use_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.RadioMenuItem` widget

Creates a new `gtk.RadioMenuItem` containing a label with its text specified by `label`. `label` will be parsed for underscores that indicate the mnemonic accelerator for the radiomenuitem. The radiomenuitem will be added to the group containing the `gtk.RadioMenuItem` specified by `group`. If `group` is `None`, a new group will be created to hold the new radiomenuitem. If `label` is `None` the radiomenuitem is created without a label.

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.

## Methods

### gtk.RadioMenuItem.get_group

        def get_group()

Returns : | the list of radiomenuitems in the same group that contains the radiomenuitem or `None`

The `get_group`() method returns the list of `gtk.RadioMenuItem`s that are in the same group as the radiomenuitem or `None` if the radiomenuitem is not in a group.

### gtk.RadioMenuItem.set_group

        def set_group(group)

`group` : | a `gtk.RadioMenuItem` whose group the radiomenuitem will be added to or `None`.

The `set_group`() method adds the radiomenuitem to the group of the `gtk.RadioMenuItem` specified by `group`.

In PyGTK 2.6.2 and above, if `group` is `None` the radiomenuitem will be removed from its current group.

## Signals

### The "group-changed" gtk.RadioMenuItem Signal

        def callback(radiomenuitem, user_param1, ...)

`radiomenuitem` : | the radiomenuitem that received the signal
`user_param1` : | the first user parameter (if any) specified with the `connect`() method
`...` : | additional user parameters (if any)

### Note

This signal is available in GTK+ 2.4 and above.

The "group-changed" signal is emitted when a `gtk.RadioMenuItem` is added to or removed from the group.

Prev | Up | Next
gtk.RadioButton | Home | gtk.RadioToolButton