Thread Perl/Tk, eigene scrollbar definieren (1 answers)
Opened by #Kein Kommentar at 2008-04-27 20:18

#Kein Kommentar
 2008-04-30 17:01
#109032 #109032
User since
2007-06-09
575 Artikel
HausmeisterIn
[default_avatar]
hmmm, dieses ausgegrabene skript ändert bei mir nichts an der scrollbar (obowhl es eigentlich so sein müsste!):

Code: (dl )
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;


weiß jemand, warum das nicht funktioniert?
Gerade weil wir alle in einem Boot sitzen, sollten wir froh sein, dass nicht alle auf unserer Seite sind

View full thread Perl/Tk, eigene scrollbar definieren