Package: gtk
Function gtk:file-chooser-current-name
Lambda Listgtk:file-chooser-current-name (chooser) SyntaxArgumentsDetails
Gets or sets the current name in the file selector, as entered by the user
in the text entry for "Name". This is meant to be used in save dialogs, to get the currently typed filename when the file itself does not exist yet. For example, an application that adds a custom extra widget to the file chooser for "file format" may want to change the extension of the typed filename based on the chosen format, say, from ".jpg" to ".png". Note that the name passed in here is a UTF-8 string rather than a filename. This function is meant for such uses as a suggested name in a "Save As..." dialog. You can pass "Untitled.doc" or a similarly suitable suggestion for the name. If you want to preselect a particular existing file, you should use the gtk:file-chooser-file function instead. Please see the documentation for this function for an example of using the gtk:file-chooser-current-name function as well. Warning | See also |
2025-09-21