home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _8a27eb101988e2121a5139ac1f7eb3a2 < prev    next >
Text File  |  2004-06-01  |  398b  |  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.