FileChooserButton.newWithDialog

Creates a #GtkFileChooserButton widget which uses dialog as its file-picking window.

Note that dialog must be a #GtkDialog (or subclass) which implements the #GtkFileChooser interface and must not have [gtk.types.DialogFlags.DestroyWithParent] set.

Also note that the dialog needs to have its confirmative button added with response [gtk.types.ResponseType.Accept] or [gtk.types.ResponseType.Ok] in order for the button to take over the file selected in the dialog.

Parameters

dialogthe widget to use as dialog

Returns

a new button widget.