Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 853 Bytes

filechooserbutton.rst

File metadata and controls

32 lines (22 loc) · 853 Bytes

FileChooserButton

A FileChooserButton provides a Button-style widget which when clicked launches a :doc`filechooserdialog`.

Constructor

The FileChooserButton is constructed using:

GtkWidget *filechooserbutton = gtk_file_chooser_button_new();

Methods

The title displayed on the dialog can be set with:

gtk_file_chooser_button_set_title(GTK_FILE_CHOOSER_BUTTON(filechooserbutton), title);

Customisation of the FileChooserButton width can be made via:

gtk_file_chooser_button_set_width_chars(GTK_FILE_CHOOSER_BUTTON(filechooserbutton), width);

The width should be a value set in pixels.

Example

Below is an example of a FileChooserButton:

.. literalinclude:: _examples/filechooserbutton.c

Download: :download:`FileChooserButton <_examples/filechooserbutton.c>`