The fileselector
widget class provides a Motif-like file
selector dialog box which can be used to prompt the user for a file name.
fileselector
pathName ?options?
The fileselector
class provides the same options as the
dialog
class, and additionally:
foreground
Foreground
-foreground
black
background
Background
-background
#ccc
-mode
read
write
the file-selector assumes that the user is writing
a new file and so will allow the user to create new directories. If
set to read
(the default), the file-selector assumes that
the user is reading in an existing file and so will not allow the user
to create new directories.
filter
Filter
-filter
*
setCwd
SetCwd
-setcwd
1
1
(the default),
then the file-selector leaves the current working directory as that which
the user finally selected. If set to 0
, when the user
presses the "Ok" button, the file-selector changes the current working
directory back to the directory which was current when it was created.
The former mode is useful when loading or saving files - the user will
probably want to continue working in that directory. The latter mode is
useful when inserting files - the user will probably want to continue
working in the directory in which the main file exists. Pressing
the "Cancel" button will always change the current working directory back
that what it was when the file-selector was created.
file
File
-file
""
/
" characters).
scrollbar
Scrollbar
-scrollbar
right
left
or right
(the default).
okButton
OkButton
-okbutton
Ok
cancelButton
CancelButton
-cancelbutton
Cancel
filterButton
FilterButton
-filterbutton
Filter
-okcommand
""
-cancelcommand
""
The fileselector
class provides the same operations as the
dialog
class:
configure
?options...?
center
?window?