Package: gtk

Class gtk-file-chooser-button

Superclasses

Documented Subclasses

None

Direct Slots

dialog
The "dialog" property of type gtk-file-chooser (Write / Construct Only)
Instance of the gtk-file-chooser-dialog associated with the button.
Since 2.6
focus-on-click
The "focus-on-click" property of type :boolean (Read / Write)
Whether the gtk-file-chooser-button button grabs focus when it is clicked with the mouse.
Default value: true
Since 2.10
title
The "title" property of type :string (Read / Write)
Title to put on the gtk-file-chooser-dialog associated with the button.
Default value: "Select a File"
Since 2.6
width-chars
The "width-chars" property of type :int (Read / Write)
The width of the entry and label inside the button, in characters.
Allowed values: >= G_MAXULONG
Default value: -1
Since 2.6

Details

The gtk-file-chooser-button is a widget that lets the user select a file. It implements the gtk-file-chooser interface. Visually, it is a file name with a button to bring up a gtk-file-chooser-dialog. 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.

Example: 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 gtk-file-chooser-button supports the gtk-file-chooser-action's :open and :select-folder.

Important
The gtk-file-chooser-button will ellipsize the label, and thus will request little horizontal space. To give the button more space, you should call the functions gtk-widget-get-preferred-size, gtk-file-chooser-button-set-width-chars, or pack the button in such a way that other interface elements give space to the widget.

Signal Details

The "file-set" signal
 lambda (widget)   : Run First      
The "file-set" signal is emitted when the user selects a file. Note that this signal is only emitted when the user changes the file.
widget
The object which received the signal.
Since 2.12
 

Slot Access Functions

Inherited Slot Access Functions

2013-6-18