Leser: 5
2 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/local/bin/perl
use Tk;
my $mw = new MainWindow; # Main Window
my $textarea = $mw -> Frame(); #Creating Another Frame
my $txt = $textarea -> Text(-width=>40, -height=>40);
my $srl_y = $textarea -> Scrollbar(
-orient=>'v',
-command=> [yview => $txt],
-background => 'red',
-activebackground => 'blue',
);
my $srl_x = $textarea -> Scrollbar(-orient=>'h',-command=>[xview => $txt],);
$txt -> configure(-yscrollcommand=>['set', $srl_y],
-xscrollcommand=>['set',$srl_x]);
$txt -> grid(-row=>1,-column=>1);
$srl_y -> grid(-row=>1,-column=>2,-sticky=>"ns");
$srl_x -> grid(-row=>2,-column=>1,-sticky=>"ew");
$textarea -> grid(-row=>5,-column=>1,-columnspan=>2);
MainLoop;
2 Einträge, 1 Seite |