home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 July / APC0407D2.iso / workshop / apache / files / ActivePerl-5.8.3.809-MSWin32-x86.msi / _8a27eb101988e2121a5139ac1f7eb3a2 < prev    next >
Encoding:
Text File  |  2004-02-02  |  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.