Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 taking refuge in the Monastery: (7)
As of 2014-10-25 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (143 votes), past polls