DOKK / manpages / debian 11 / tk-fsdialog / fsdialog.3tcl.en
fsdialog(3tcl) File system dialog boxes fsdialog(3tcl)


fsdialog - dialog boxes for the user to select a file or directory.

package require Tk 8.6.6

package require fsdialog 1.0

ttk::fsdialog configfile ?name?

ttk::fsdialog history ?name ...?

ttk::fsdialog preferences ?option? ?value option value ...?


The fsdialog package installs direct replacements for the original tk_getOpenFile, tk_getSaveFile, and tk_chooseDirectory commands of Tk. The replacements provide more advanced features for user interaction. See the manual pages of the original commands for the details on their usage.

To control the advanced features, the package provides some additional commands.

Specify a configuration file for the dialogs to automatically store and retrieve the preference settings and history. By default, the package will use the file ".config/tcltk/fsdialog.cfg", but only if that file exists. Calling this command without the name argument will create the default configuration file, so it is guaranteed to be used. Specify an empty string for name to prevent the use of the default configuration file, even if it exists.
Get or seed the list of files and directories that will be presented to the user in various drop-down lists. That list is normally maintained automatically, but this command makes it available for external storage and loading.
Configure preference settings. This command is provide for situations where the use of a specific configuration file for the file system dialogs is not desired. For example, when the preferences are going to be stored as part of the overall application configuration.

If no name or value arguments are supplied, the command returns a list containing alternating option names and values for the channel. If name is supplied but no value then the command returns the current value of the given option. If one or more pairs of name and value are supplied, the command sets each of the named options to the corresponding value; in this case the return value is an empty string.

The following settings are available:

Show the short (0) or long (1) version of the file list. Default: 0.
Combine files and directories in a single pane (0) or show directories in a separate pane (1). Default: 0.
Show hidden files and directories. Default: 0.
List directories before files (0) or list all entries without making a distinction between files and directories (1). This setting only has effect when files and directories are shown in a single pane. Default: 0.
Show the entries in reverse sorting order. Default: 0.
Select which property to use for sorting the entries in the file pane. The directory pane is always sorted by name. Possible values are name, date, and size. Default: name.

Copyright (c) 2018 Schelte Bron
1.0 doc