use warnings; use strict; use Tk; use Tk::Tree; my $main = MainWindow->new (-title => "Test tree"); my $tree = $main->ScrlTree ( -itemtype => 'text', -separator => '/', -scrollbars => "osoe",-bg => 'red' ); $tree->add ( 1, -text => 'Some sample text', -itemtype => 'text', ); $tree->autosetmode; $tree->close (1); $tree->pack(-fill=>'both',-expand => 1); MainLoop;