GtkFileChooserButton Constructor

GtkFileChooserButton (string title, GtkFileChooserAction action);

Use this constructor to create a new file-selecting button widget.

Example 63. Using a GtkFileChooser button.

//Creating and initialising a new window
// to add the FileChooser to
$window = new GtkWindow();

//Quit the main loop when window is destroyed
    array('Gtk', 'main_quit')

//Setting parameters of the window
$window->set_title('GtkFileChooser Demo');

* Creating a new file chooser button
* Note that the second parameter dictates what action
* will be performed when the open button of the
* GtkFileChooserDialog widget is clicked
$thebutton = new GtkFileChooserButton(
    'Select the File',

//Creating a label and a quit button
$thelabel = new GtkLabel('Click to select a file: ');
$toquit = new GtkButton('_Quit');
    array($window, 'destroy')

//Creating a layout to add the elements
$thehbox = new GtkHBox();
$thevbox = new GtkVBox();

//Adding the elements to the layout

//Displaying the window and starting the main loop