gtk.ToggleToolButton
Prev | The gtk Class Reference | Next

## gtk.ToggleToolButton

gtk.ToggleToolButton — A `gtk.ToolItem` containing a toggle button (new in PyGTK 2.4)

## Synopsis

    class gtk.ToggleToolButton(gtk.ToolButton):
        gtk.ToggleToolButton(stock_id=None)
        def set_active(is_active)
        def get_active()

## Ancestry

    +-- gobject.GObject
      +-- gtk.Object
        +-- gtk.Widget
          +-- gtk.Container
            +-- gtk.Bin
              +-- gtk.ToolItem
                +-- gtk.ToolButton
                  +-- gtk.ToggleToolButton

## gtk.ToggleToolButton Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

gtk.ToolItem Properties

gtk.ToolButton Properties

"active" | Read-Write | If the toggle tool button should be pressed in or not. This property is available in GTK+ 2.8 and above.

## gtk.ToggleToolButton Style Properties

gtk.Widget Style Properties

gtk.ToolButton Style Properties

## gtk.ToggleToolButton Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

gtk.Container Signal Prototypes

gtk.ToolItem Signal Prototypes

gtk.ToolButton Signal Prototypes

"toggled" | `def callback(`toggletoolbutton`, `user_param1`, `...`)`

## Description

### Note

This widget is available in PyGTK 2.4 and above.

A `gtk.ToggleToolButton` is a `gtk.ToolItem` that contains a toggle button. Use the gtk.ToggleToolButton() constructor to create a new `gtk.ToggleToolButton`.

## Constructor

        gtk.ToggleToolButton(stock_id=None)

`stock_id` : | the name of a stock item
Returns : | a newly created `gtk.ToggleToolButton`

### Note

This constructor is available in PyGTK 2.4 and above.

Creates a new `gtk.ToggleToolButton`. If `stock_id` is not `None` the toggle tool button contains the image and text from the specified stock item.

## Methods

### gtk.ToggleToolButton.set_active

        def set_active(is_active)

`is_active` : | if `True` the toggle tool button is active

### Note

This method is available in PyGTK 2.4 and above.

The `set_active`() method sets the status of the toggle tool button to the value specified by `is_active`. If `is_active` is `True` the `gtk.ToggleButton` is 'pressed in' (active). This method causes the toggled signal to be emitted.

### gtk.ToggleToolButton.get_active

        def get_active()

Returns : | `True` if the toggle tool button is pressed in (active)

### Note

This method is available in PyGTK 2.4 and above.

The `get_active`() method returns `True` if the toggle tool button is pressed in (active) and `False` if it is raised.

## Signals

### The "toggled" gtk.ToggleToolButton Signal

        def callback(toggletoolbutton, user_param1, ...)

`toggletoolbutton` : | the toggletoolbutton 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 "toggled" signal is emitted when the toggle tool button changes state.

Prev | Up | Next
gtk.ToggleButton | Home | gtk.Toolbar