#!/usr/bin/perl use strict; use Tk; use Tk::ProgressBar; # make window my $mw = new MainWindow(); # tell MainWindow to execute this function after 1000 milliseconds $mw->after(1000,\&MyUpdate); # or tell MainWindow to execute this sub repeatedly $mw->repeat(1000,\&MyOtherUpdate); MainLoop; sub MyUpdate { # ... start something? } sub MyOtherUpdate { # ... update window, reset progress bar? }
Untested!
PS If you use the progress bar, you must remember to update the window (via $mw->update())
In reply to Re: creating simple GUI
by Sandy
in thread creating simple GUI
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |