Gtk.FileChooserButton.new_with_dialog

function new_with_dialog(dialog:Gtk.Widget):Gtk.Widget {
    // Gjs wrapper for gtk_file_chooser_button_new_with_dialog()
}

Creates a Gtk.FileChooserButton widget which uses dialog as its file-picking window.

Note that dialog must be a Gtk.Dialog (or subclass) which implements the Gtk.FileChooser interface and must not have Gtk.DialogFlags.destroy_with_parent set.

Also note that the dialog needs to have its confirmative button added with response Gtk.ResponseType.accept or Gtk.ResponseType.ok in order for the button to take over the file selected in the dialog.

Since 2.6

dialog

the widget to use as dialog

Returns

a new button widget.