Contrib/book-examples/f-16.1.pl
raw| 1 | #!/usr/local/bin/perl -w |
| 2 | |
| 3 | # |
| 4 | # Figure 16.1, p159 |
| 5 | # |
| 6 | |
| 7 | use Tk; |
| 8 | |
| 9 | my $mw = MainWindow->new; |
| 10 | for $relief('raised','sunken','flat','groove','ridge') { |
| 11 | print "$relief"; |
| 12 | $$relief = $mw->Frame( |
| 13 | -width => '15m', |
| 14 | -height => '10m', |
| 15 | -relief => $relief, |
| 16 | -borderwidth => 4, |
| 17 | ); |
| 18 | $$relief->pack(-side => 'left', -padx => '2m', -pady => '2m'); |
| 19 | } |
| 20 | $flat->configure(-background => 'black'); #perl complains here |
| 21 | |
| 22 | MainLoop; |