NAME
Tk::FileBrowser - Multi column file system explorer
SYNOPSIS
require Tk::FileBrowser;
my $b = $window->FileBrowser(@options)->pack;
$b->load($folder);
DESCRIPTION
A multicolumn file browser widget. Columns are configurable, sortable and resizable.
CONFIG VARIABLES
- Switch: -casedependantsort
-
Default value 0;
If you change the value you have to call refresh to see your changes.
- Switch: -columns
-
Specify a list of column names to display. Only available at create time. Allowed values are 'Accessed', 'Created', 'Modified' and 'Size'.
Default value ['Size', 'Modified'].
The 'Name' column is always present and always first.
- Switch: -directoriesfirst
-
Default value 1.
If you change the value you have to call refresh to see your changes.
- Switch: -diriconcall
-
Callback for obtaining the dir icon. By default it is set to a call that returns the default folder.xpm in the Perl/Tk distribution.
- Switch: -fileiconcall
-
Callback for obtaining the file icon. By default it is set to a call that returns the default file.xpm in the Perl/Tk distribution.
- Switch: -invokefile
-
This callback is executed when a user double clicks a file.
-
Default value 0;
If you change the value you have to call load again to see your changes.
- Switch: -sorton
-
Can be any valid column name. Default value 'Name'.
If you change the value you have to call refresh to see your changes.
- Switch: -sortorder
-
Can be 'ascending' or 'descending'. Default value 'ascending'.
If you change the value you have to call refresh to see your changes.
METHODS
- load($folder)
-
loads $folder into memory and refreshes the display if succesfull.
- refresh
-
Deletes all entries in the list and rebuilds it.
LICENSE
Same as Perl.
AUTHOR
Hans Jeuken (hanje at cpan dot org)
TODO
- Allow columns to be configured on the fly.
- Add Column types for Owner, Group, Permissions
- Make column types user definable.
- Recognize links.
BUGS AND CAVEATS
Loading and sorting large folders takes ages.
If you find any bugs, please contact the author.