#!/usr/local/bin/perl -w

use Tk;

$top = MainWindow->new("");

$top->wm("minsize",  10, 10);
$top->wm("geometry", "100x100");

$c = $top->Canvas("-width" => 200,"-height" => 200);


$s1 = $top->Scrollbar("-command" => ["yview",$c]);
$s2 = $top->Scrollbar("-orient" => "horizontal",
                           "-command" => ["xview",$c]);
$c->configure("-yscrollcommand" => ["set",$s1]);
$c->configure("-xscrollcommand" => ["set",$s2]);


$id = $c->create("line",0,0, 0,200, 200,0, 200,200, 0,0, 200,0, 200,200, 0,200,
                 "-width" => 4);

print "id=$id\n";

$c->configure("-scrollregion" => [0,0,204,204]);


$s1->pack( "-side"   => "left", "-fill"   => "y");
$s2->pack(  "-side"   => "bottom", "-fill"   => "x");
$c->pack("-expand" => 1, "-fill" => "both" );


Tk::MainLoop;



