home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-perl-addon-1.4.9-installer.exe / Tiler.pl < prev    next >
Encoding:
Perl Script  |  2004-06-01  |  398 b   |  16 lines

  1. # Tiler, arrange widgets in rows.
  2.  
  3. use strict;
  4. use Tk;
  5. use Tk::Tiler;
  6.  
  7. my $mw = MainWindow->new();
  8. my $tiler = $mw->Scrolled('Tiler');
  9. my $num = $tiler->cget('-rows') * $tiler->cget('-columns');
  10. $mw->Label(-text => "Tiler with $num widgets")->pack;
  11. foreach (1 .. $num)   {
  12.     $tiler->Manage( $tiler->Label(-text => "**$_**") );
  13. }
  14. $tiler->pack(qw/-expand yes -fill both/);
  15. MainLoop;
  16.