FileChooserButton


Object Hierarchy:

Gtk.FileChooserButton Gtk.FileChooserButton Gtk.FileChooserButton Gtk.Box Gtk.Box Gtk.Box->Gtk.FileChooserButton Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.FileChooserButton Atk.Implementor->Gtk.Box Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.FileChooserButton Gtk.Buildable->Gtk.Box Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.Orientable Gtk.Orientable Gtk.Orientable->Gtk.FileChooserButton Gtk.Orientable->Gtk.Box Gtk.FileChooser Gtk.FileChooser Gtk.FileChooser->Gtk.FileChooserButton

Description:

[ CCode ( type_id = "gtk_file_chooser_button_get_type ()" ) ]
public class FileChooserButton : Box, Implementor, Buildable, FileChooser, Orientable

The FileChooserButton is a widget that lets the user select a file.

It implements the FileChooser interface. Visually, it is a file name with a button to bring up a FileChooserDialog. The user can then use that dialog to change the file associated with that button. This widget does not support setting the select_multiple property to true.

Create a button to let the user select a file in /etc

{
GtkWidget *button;

button = gtk_file_chooser_button_new (_("Select a file"),
GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
"/etc");
}

The FileChooserButton supports the FileChooserActions gtk_file_chooser_action_open and gtk_file_chooser_action_select_folder .

Note:

The FileChooserButton will ellipsize the label, and will thus request little horizontal space. To give the button more space, you should call get_preferred_size, set_width_chars, or pack the button in such a way that other interface elements give space to the widget.

CSS nodes

GtkFileChooserButton has a CSS node with name “filechooserbutton”, containing a subnode for the internal button with name “button” and style class “.file”.

GtkFileChooserButton


Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Orientable



2022 vala-language.org