---
name: "Gtk2::ToggleAction"
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::ToggleAction"
---

# Gtk2::ToggleAction(3pm)

wrapper for GtkToggleAction

## NAME

Gtk2::ToggleAction - wrapper for GtkToggleAction

## SYNOPSIS

```
  my $action = Gtk2::ToggleAction->new (name => 'one',
                                        tooltip => 'One');
```

## DESCRIPTION

Note that `"new"` is the plain Glib::Object `"new"` (see Gtk2::Action).  The name, label, tooltip and stock\_id arguments of the C code `"gtk_toggle_action_new()"` can be given as key/value pairs, plus other property values like active or sensitive.

## HIERARCHY

```
  Glib::Object
  +----Gtk2::Action
       +----Gtk2::ToggleAction
```

## INTERFACES

```
  Gtk2::Buildable
```

## METHODS

### boolean = $action-\>get\_active

### $action-\>set\_active ($is\_active)

- •

  `$is_active` (boolean)

### boolean = $action-\>get\_draw\_as\_radio

### $action-\>set\_draw\_as\_radio ($draw\_as\_radio)

- •

  `$draw_as_radio` (boolean)

### $action-\>toggled

## PROPERTIES

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

  If the toggle action should be active in or not

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

  Whether the proxies for this action look like radio action proxies

## SIGNALS

- **toggled** (Gtk2::ToggleAction)

  ## SEE ALSO

Gtk2, Glib::Object, Gtk2::Action

## COPYRIGHT

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

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