Debian Codegraph @

Contrib/book-examples/f-16.8.pl

raw
1 #!/usr/local/bin/perl -w
2
3 #
4 # Figure 16.8, p166
5 #
6
7
8 use Tk;
9
10 my $mw = MainWindow->new;
11 my $times = $mw->Radiobutton(-text => 'Times',
12 -variable => \$font,
13 -value => 'times',
14 -anchor => 'w',
15 );
16 my $helvetica = $mw->Radiobutton(-text => 'Helvetica',
17 -variable => \$font,
18 -value => 'helvetica',
19 -anchor => 'w',
20 );
21 my $courier = $mw->Radiobutton(-text => 'Courier',
22 -variable => \$font,
23 -value => 'courier',
24 -anchor => 'w',
25 );
26 my $symbol = $mw->Radiobutton(-text => 'Symbol',
27 -variable => \$font,
28 -value => 'symbol',
29 -anchor => 'w',
30 );
31 $times->pack(-side => 'top', -fill => 'x');
32 $helvetica->pack(-side => 'top', -fill => 'x');
33 $courier->pack(-side => 'top', -fill => 'x');
34 $symbol->pack(-side => 'top', -fill => 'x');
35
36 MainLoop;