Debian Codegraph @

examples/scrolled_demo

raw
1 #!/usr/local/bin/perl -w
2
3 use Tk;
4 use strict;
5
6 @ARGV = __FILE__ unless (@ARGV);
7 my @data = <>;
8
9 my $top = MainWindow->new();
10 # $top->optionAdd('*Scrollbar.width' => '3.5m');
11
12 $top->Button(-text => 'Quit', -command => [destroy => $top])
13 ->pack(-side => 'bottom', -fill => 'x');
14
15 my $lb = $top->ScrlListbox(-scrollbars => 'rsw',-label => 'sw');
16 $lb->configure(-labelRelief => 'raised');
17 $lb->insert('end',@data);
18 $lb->pack(-side => 'left', -expand => 1, -fill => 'both' );
19
20 $lb = $top->ScrlListbox(-scrollbars => 'rnw',-label => 'nw');
21 $lb->configure(-labelRelief => 'raised');
22 $lb->insert('end',@data);
23 $lb->pack(-side => 'left', -expand => 1, -fill => 'both' );
24
25 $lb = $top->ScrlListbox(-scrollbars => 'rse',-label => 'se');
26 $lb->configure(-labelRelief => 'raised');
27 $lb->insert('end',@data);
28 $lb->pack(-side => 'left', -expand => 1, -fill => 'both' );
29
30 $lb = $top->ScrlListbox(-scrollbars => 'rne',-label => 'ne');
31 $lb->configure(-labelRelief => 'raised');
32 $lb->insert('end',@data);
33 $lb->pack(-side => 'left', -expand => 1, -fill => 'both' );
34
35
36 MainLoop();