FileChooser.setPreviewWidget

Sets an application-supplied widget to use to display a custom preview of the currently selected file. To implement a preview, after setting the preview widget, you connect to the #GtkFileChooser::update-preview signal, and call gtk.file_chooser.FileChooser.getPreviewFilename or gtk.file_chooser.FileChooser.getPreviewUri on each change. If you can display a preview of the new file, update your widget and set the preview active using gtk.file_chooser.FileChooser.setPreviewWidgetActive. Otherwise, set the preview inactive.

When there is no application-supplied preview widget, or the application-supplied preview widget is not active, the file chooser will display no preview at all.

interface FileChooser
void
setPreviewWidget

Parameters

previewWidget gtk.widget.Widget

widget for displaying preview.