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

# Gtk2::FileChooserButton(3pm)

wrapper for GtkFileChooserButton

## NAME

Gtk2::FileChooserButton - wrapper for GtkFileChooserButton

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::Box
                           +----Gtk2::HBox
                                +----Gtk2::FileChooserButton
```

## INTERFACES

```
  Glib::Object::_Unregistered::AtkImplementorIface
  Gtk2::Buildable
  Gtk2::Orientable
  Gtk2::FileChooser
```

## METHODS

### widget = Gtk2::FileChooserButton-\>new ($title, $action)

- •

  `$title` (string)

- •

  `$action` (Gtk2::FileChooserAction)

### widget = Gtk2::FileChooserButton-\>new\_with\_backend ($title, $action, $backend)

- •

  `$title` (string)

- •

  `$action` (Gtk2::FileChooserAction)

- •

  `$backend` (string)

### widget = Gtk2::FileChooserButton-\>new\_with\_dialog ($dialog)

- •

  `$dialog` (Gtk2::Widget)

### boolean = $button-\>get\_focus\_on\_click

Since: gtk+ 2.10

### $button-\>set\_focus\_on\_click ($focus\_on\_click)

- •

  `$focus_on_click` (boolean)

Since: gtk+ 2.10

### string = $button-\>get\_title

### $button-\>set\_title ($title)

- •

  `$title` (string)

### integer = $button-\>get\_width\_chars

### $button-\>set\_width\_chars ($n\_chars)

- •

  `$n_chars` (integer)

## PROPERTIES

- 'dialog' (Gtk2::FileChooser : default undef : writable / construct-only / private)

  The file chooser dialog to use.

- 'focus-on-click' (boolean : default true : readable / writable / private)

  Whether the button grabs focus when it is clicked with the mouse

- 'title' (string : default "Select a File" : readable / writable / private)

  The title of the file chooser dialog.

- 'width-chars' (integer : default -1 : readable / writable / private)

  The desired width of the button widget, in characters.

## SIGNALS

- **file-set** (Gtk2::FileChooserButton)

  ## ENUMS AND FLAGS

### enum Gtk2::FileChooserAction

- •

  'open' / 'GTK\_FILE\_CHOOSER\_ACTION\_OPEN'

- •

  'save' / 'GTK\_FILE\_CHOOSER\_ACTION\_SAVE'

- •

  'select-folder' / 'GTK\_FILE\_CHOOSER\_ACTION\_SELECT\_FOLDER'

- •

  'create-folder' / 'GTK\_FILE\_CHOOSER\_ACTION\_CREATE\_FOLDER'

## SEE ALSO

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Box, Gtk2::HBox

## COPYRIGHT

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

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