1Tk::DirSelect(3)      User Contributed Perl Documentation     Tk::DirSelect(3)
2
3
4

NAME

6       Tk::DirSelect - Cross-platform directory selection widget.
7

SYNOPSIS

9         use Tk::DirSelect;
10         my $ds  = $mw->DirSelect();
11         my $dir = $ds->Show();
12

DESCRIPTION

14       This module provides a cross-platform directory selection widget. For
15       systems running Microsoft Windows, this includes selection of local and
16       mapped network drives. A context menu (right-click or <Button3>) allows
17       the creation, renaming, and deletion of directories while browsing.
18
19       Note: Perl/Tk 804 added the "chooseDirectory" method which uses native
20       system dialogs where available. (i.e. Windows) If you want a native
21       feel for your program, you probably want to use that method instead --
22       possibly using this module as a fallback for systems with older
23       versions of Tk installed.
24

METHODS

26   "DirSelect([-title => 'title'], [options])"
27       Constructs a new DirSelect widget as a child of the invoking object
28       (usually a MainWindow).
29
30       The title for the widget can be set by specifying "-title => 'Title'".
31       Any other options provided will be passed through to the DirTree widget
32       that displays directories, so be sure they're appropriate (e.g.
33       "-width")
34
35   "Show([directory], [options])"
36       Displays the DirSelect widget and returns the user selected directory
37       or "undef" if the operation is canceled.
38
39       All arguments are optional. The first argument (if defined) is the
40       initial directory to display. The default is to display the current
41       working directory. Any additional options are passed through to the
42       Popup() method. This means that you can do something like
43
44         $ds->Show(undef, -popover => $mw);
45
46       to center the dialog over your application.
47

DEPENDENCIES

49       •   Perl 5.004
50
51       •   Tk 800
52
53       •   Win32API::File (under Microsoft Windows only)
54
56       Copyright 2000-2001 Kristi Thompson <kristi@kristi.ca> Copyright
57       2002-2005,2010 Michael Carman <mjcarman@cpan.org>
58
59       This program is free software; you can redistribute it and/or modify it
60       under the terms of either: the GNU General Public License as published
61       by the Free Software Foundation; or the Artistic License.
62
63       See http://dev.perl.org/licenses/ for more information.
64
65
66
67perl v5.36.0                      2022-07-22                  Tk::DirSelect(3)
Impressum