---
name: "Gtk2::ToggleButton"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::ToggleButton"
---

# Gtk2::ToggleButton(3pm)

wrapper for GtkToggleButton

## NAME

Gtk2::ToggleButton - wrapper for GtkToggleButton

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::Bin
                           +----Gtk2::Button
                                +----Gtk2::ToggleButton
```

## INTERFACES

```
  Glib::Object::_Unregistered::AtkImplementorIface
  Gtk2::Buildable
  Gtk2::Activatable
```

## METHODS

### widget = Gtk2::ToggleButton-\>new ($label=undef)

- •

  `$label` (string)

### widget = Gtk2::ToggleButton-\>new\_with\_label ($label=undef)

- •

  `$label` (string)

### widget = Gtk2::ToggleButton-\>new\_with\_mnemonic ($label=undef)

- •

  `$label` (string)

### boolean = $toggle\_button-\>get\_active

### $toggle\_button-\>set\_active ($is\_active)

- •

  `$is_active` (boolean)

### boolean = $toggle\_button-\>get\_inconsistent

### $toggle\_button-\>set\_inconsistent ($setting)

- •

  `$setting` (boolean)

### boolean = $toggle\_button-\>get\_mode

### $toggle\_button-\>set\_mode ($draw\_indicator)

- •

  `$draw_indicator` (boolean)

### $toggle\_button-\>toggled

## PROPERTIES

- 'active' (boolean : default false : readable / writable / private)

  If the toggle button should be pressed in or not

- 'draw-indicator' (boolean : default false : readable / writable / private)

  If the toggle part of the button is displayed

- 'inconsistent' (boolean : default false : readable / writable / private)

  If the toggle button is in an "in between" state

## SIGNALS

- **toggled** (Gtk2::ToggleButton)

  ## SEE ALSO

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Button

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
