Gtk.RadioToolButton

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Actionable Gtk.Actionable GObject.GInterface->Gtk.Actionable Gtk.Activatable Gtk.Activatable GObject.GInterface->Gtk.Activatable Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.ToolButton Gtk.ToolButton Gtk.Actionable->Gtk.ToolButton Gtk.ToolItem Gtk.ToolItem Gtk.Activatable->Gtk.ToolItem Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.ToolItem Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.RadioToolButton Gtk.RadioToolButton Gtk.ToggleToolButton Gtk.ToggleToolButton Gtk.ToggleToolButton->Gtk.RadioToolButton Gtk.ToolButton->Gtk.ToggleToolButton Gtk.ToolItem->Gtk.ToolButton Gtk.Widget->Gtk.Container

Subclasses:None

Properties

Inherited:Gtk.ToggleToolButton (1), Gtk.ToolButton (6), Gtk.ToolItem (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Activatable (2), Gtk.Actionable (2)
Name Type Flags Short Description
group Gtk.RadioToolButton w The radio tool button whose group this button belongs to.

Style Properties

Inherited:Gtk.ToolButton (1), Gtk.Widget (17)

Class Details

class Gtk.RadioToolButton(*args, **kwargs)
Bases:Gtk.ToggleToolButton
Abstract:No
Structure:Gtk.RadioToolButtonClass

A Gtk.RadioToolButton is a Gtk.ToolItem that contains a radio button, that is, a button that is part of a group of toggle buttons where only one button can be active at a time.

Use Gtk.RadioToolButton.new() to create a new Gtk.RadioToolButton. Use Gtk.RadioToolButton.new_from_widget() to create a new Gtk.RadioToolButton that is part of the same group as an existing Gtk.RadioToolButton.

CSS nodes

Gtk.RadioToolButton has a single CSS node with name toolbutton.

classmethod new(group)[source]
Parameters:group ([Gtk.RadioButton] or None) – An existing radio button group, or None if you are creating a new group
Returns:The new Gtk.RadioToolButton
Return type:Gtk.ToolItem

Creates a new Gtk.RadioToolButton, adding it to group.

New in version 2.4.

classmethod new_from_stock(group, stock_id)[source]
Parameters:
  • group ([Gtk.RadioButton] or None) – an existing radio button group, or None if you are creating a new group
  • stock_id (str) – the name of a stock item
Returns:

The new Gtk.RadioToolButton

Return type:

Gtk.ToolItem

Creates a new Gtk.RadioToolButton, adding it to group. The new Gtk.RadioToolButton will contain an icon and label from the stock item indicated by stock_id.

New in version 2.4.

Deprecated since version 3.10: Use Gtk.RadioToolButton.new() instead.

classmethod new_from_widget(group)[source]
Parameters:group (Gtk.RadioToolButton or None) – An existing Gtk.RadioToolButton, or None
Returns:The new Gtk.RadioToolButton
Return type:Gtk.ToolItem

Creates a new Gtk.RadioToolButton adding it to the same group as gruup

New in version 2.4.

classmethod new_with_stock_from_widget(group, stock_id)[source]
Parameters:
Returns:

A new Gtk.RadioToolButton

Return type:

Gtk.ToolItem

Creates a new Gtk.RadioToolButton adding it to the same group as group. The new Gtk.RadioToolButton will contain an icon and label from the stock item indicated by stock_id.

New in version 2.4.

Deprecated since version 3.10: Gtk.RadioToolButton.new_from_widget

get_group()[source]
Returns:The group self belongs to.
Return type:[Gtk.RadioButton]

Returns the radio button group self belongs to.

New in version 2.4.

set_group(group)[source]
Parameters:group ([Gtk.RadioButton] or None) – an existing radio button group, or None

Adds self to group, removing it from the group it belonged to before.

New in version 2.4.

Property Details

Gtk.RadioToolButton.props.group
Name:group
Type:Gtk.RadioToolButton
Default Value:None
Flags:WRITABLE

Sets a new group for a radio tool button.

New in version 2.4.