#!/usr/bin/perl use warnings; use Tk; sub GUI() { $fenetre = new MainWindow( -title => 'test', ); $fenetre->minsize( 200, 70 ); $cadre_voie = $fenetre->Frame()->pack(-fill => 'both', -expand => 1); $voie = $cadre_voie->Scrolled( 'Canvas', -background => '#A0A0A0', ); $voie->pack(-fill => 'both', -expand => 1); $cadre_voie->Scale(-orient=>'horizontal')-> pack(); $fenetre->repeat( 500, sub { $voie->scale('all',0,0,1,1); } ); MainLoop; # Obligatoire } GUI();