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