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 file chooser dialog associated with the button. This property is not readable or writable from the Lisp side. The accessor is not exported.
focus-on-click
The focus-on-click property of type :boolean (Read / Write)
Whether the file chooser button grabs focus when it is clicked with the mouse.
Default value: true
title
The title property of type :string (Read / Write)
Title to put on the file chooser dialog associated with the button.
Default value: "Select a File"
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: >= -1
Default value: -1

Details

The gtk:file-chooser-button widget is a widget that lets the user select a file.

GtkFileChooserButton

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

The gtk:file-chooser-button widget supports the :open and :select-folder values of the gtk:file-chooser-action enumeration.

Examples

Create a button to let the user select a file.
(let ((button (gtk:file-chooser-button-new "Select a file" :open)))
  (setf (gtk:file-chooser-current-folder button) "/etc")
  ... )    

Notes

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

CSS nodes

The gtk:file-chooser-button implementation has a CSS node with name filechooserbutton, containing a subnode for the internal button with name button and .file style class.

Signal Details

The "file-set" signal
lambda (widget)    :run-first      
The signal is emitted when the user selects a file. Note that this signal is only emitted when the user changes the file.
widget
The gtk:file-chooser-button widget which received the signal.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

#2023-3-17