http://qs321.pair.com?node_id=564089


in reply to Array to scroll..

Do you want to show the values in the Tk::Text widget?

#!/usr/bin/perl -w use strict; use Tk; my @array=(100, 200, 300, 400 , 500); my $maincolor='red'; my $mw = MainWindow->new; $mw->minsize(qw(250 200)); #x y $mw->configure(-title=>'PROGRAM', -background=>$maincolor); my $frame_6=$mw->Frame(-borderwidth => 3, -background => $maincolor)-> +pack( -side=>'top', -fill=>'x'); $frame_6->Label(-text => 'Scroll', -background=>'yellow',)->pack(-side + =>'left'); my $scroll=$mw->Scrolled("Text", -scrollbars => 'e', -font => 'normal' +, -width => 10, -height => 10,)->pack; for(0..scalar(@array)-1){ $scroll->insert($_,$array[$_]); } MainLoop;