manpagez: man pages & more
html files: pygtk
Home | html | info | man
containing a toggle button (new in PyGTK 2.4)


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


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

Implemented Interfaces

gtk.ToggleToolButton implements gtk.Buildable

gtk.ToggleToolButton Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

gtk.ToolItem Properties

gtk.ToolButton Properties

"active"Read-WriteIf 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


def callback(toggletoolbutton, user_param1, ...)



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.



stock_id :

the name of a stock item

Returns :

a newly created gtk.ToggleToolButton


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.



    def set_active(is_active)

is_active :

if True the toggle tool button is active


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.


    def get_active()

Returns :

True if the toggle tool button is pressed in (active)


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.


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)


This signal is available in GTK+ 2.4 and above.

The "toggled" signal is emitted when the toggle tool button changes state.

© 2000-2017
Individual documents may contain additional copyright information.