Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Progress bar in Tk

by nikosv (Deacon)
on Feb 10, 2016 at 09:14 UTC ( [id://1154821]=note: print w/replies, xml ) Need Help??


in reply to Progress bar in Tk

Take a look at https://git.launchpad.net/unrarextractrecover/diff/script/gui.pl?id=b326ba775652a0e320eacb005ee9b2e5fbd95db4

for a complete application/example that updates the progress bar through a thread queue

The relevant code is along those lines:

while (Tk::MainWindow->Count) { if (my $queue_message=$main::worker_to_boss_queue->dequeue_ +nb) { my ($message,$no)=@$queue_message; given ($message) { when ("allfiles") { $gui::percent_done=0; $gui::_progress->configure(-to => $no); } when ("update") { $gui::percent_done += 1; } when ("end") { $gui::percent_done += 1; enable_buttons(); } } } DoOneEvent(ALL_EVENTS); } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-23 16:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found