
10. Perl/Tk Widgets 45
DirTree
DirTree displays a list view of a directory, its previous direc-
tories and its sub-directories. A DirTree widget is derived
from the Tree class and inherits all its commands, options,
and subwidgets.
-browsecmd => callback
Invoke the callback with the selected entry when it’s
browsed.
-command => callback
Invoke the callback with the selected entry when it’s
activated.
-dircmd => callback
Invoke the callback when a directory listing is needed for
a particular directory. The first argument is the directory
name, the second a boolean indicating whether hidden
sub-directories should be listed.
-showhidden => boolean
Specifies whether hidden directories should be shown.
Default is false.
-directory => dirName
The name of the current directory displayed in the widget.
$dtree->chdir(directory);
Changes the current directory to directory.
-background -relief
-borderwidth -selectbackground
-cursor -selectborderwidth
-exportselection -selectforeground
-font -setGrid
-foreground -takefocus
-height -width
-highlightbackground -xscrollcommand
-highlightcolor -yscrollcommand
-highlightthickness