1FBox(3) User Contributed Perl Documentation FBox(3)
2
3
4
6 Tk::FBox - a file dialog
7
9 use Tk::FBox;
10 $file = $mw->FBox(...)->Show;
11
13 "Tk::FBox" is the dialog implementation behind the "getOpenFile",
14 "getSaveFile", and "chooseDirectory" method calls in the Unix/X11
15 world. As such, it supports all options for these methods and
16 additionally:
17
18 -sortcmd => sub { $_[0] cmp $_[1] }
19 Specified a callback for changing the sorting of the icons in the
20 "IconList" widget. By default, perl's "cmp" operator will be used.
21
22 From the source code:
23
24 # Using -sortcmd is really strange :-(
25 # $top->getOpenFile(-sortcmd => sub { package Tk::FBox; uc $b cmp uc $a});
26 # or, un-perlish, but useable (now activated in code):
27 # $top->getOpenFile(-sortcmd => sub { uc $_[1] cmp uc $_[0]});
28
29 This is an experimental option!
30
31 -type => $type
32 Type should be "open" for choosing existing files to open
33 (default), "save" for choosing existing or non-existing files to
34 save, or "dir" for choosing directories.
35
36 -filter => $glob
37 A file glob to restrict displayed files. This is only active if no
38 -filetypes are defined.
39
40 -force => $bool
41 If true, then there will be no dialog if a file already exists.
42
44 The original tkfbox.tcl from Tcl/Tk is:
45
46 Copyright (c) 1994-1996 Sun Microsystems, Inc.
47
48 See the file "license.terms" for information on usage and
49 redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
50
51 Translated to Perl/Tk by Slaven Rezic <srezic@cpan.org>.
52
54 Tk::getOpenFile, Tk::IconList.
55
56
57
58perl v5.28.1 2019-02-12 FBox(3)