#!/usr/bin/perl use Tk; use Tk::Tree; my $mw = MainWindow->new( -title => 'Tree', -width => 800, -height=> 600); my $tree = $mw->Tree( font => 'Courier 14', wideselection => 0, background => white, selectbackground => grey)->place( -x => 0, -y => 0, -width => 10000, -height => 1000); # Zeilen in Verzeichnisbaum einfügen foreach(qw (1000 1500 1550 1550)) { my $l = $_; $l =~ s/0//g; if ( $l eq '15') { $l =~ s/(.)(.).*/$1.$2/g; } if ( $l eq '155') { $l =~ s/(.)(.)(.).*/$1.$2.$3/g; } $tree->add($l, -text => $_); } # Weichen stellen $tree->autosetmode(); #Ast schließen #$tree->close("1"); # do create window MainLoop;