Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Array to scroll..

by reneeb (Chaplain)
on Jul 27, 2006 at 13:51 UTC ( #564089=note: print w/ replies, xml ) Need Help??


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;


Comment on Re: Array to scroll..
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://564089]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2015-07-30 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls