Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: displaying program status in perl tk

by robobunny (Friar)
on Feb 04, 2009 at 16:59 UTC ( #741353=note: print w/replies, xml ) Need Help??


in reply to Re^2: displaying program status in perl tk
in thread displaying program status in perl tk

You can keep a reference to the label and update it directly. This is generally how you have to handle any progress/meter type stuff that needs to be updated in a loop. (This is untested but should be pretty close)
my $counter_label = $mw->Label(-text => $no, -relief => 'sunken', -anchor => 'center') ->place(-relx =>0.0, -rely => 0.80, -relwidth => 1.0, -relheight = +> 0.2); ... sub count { if ($upper_no > 0) { $no = 0; while ($no < $upper_no) { $no++; $counter_label->configure(-text => $no); } } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2023-12-11 22:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?