Dear monks,
I have a script (TK) doing a database import. When loading a database into a TK-table, a notification window pops up telling the user that the script is processing the database. I’d like the windows pops up only after x-seconds of loading processing (just not to annoy the user if the process lasts only milliseconds). Unfortunately I have no idea how to implement this. So far I have:
sub import { #pop-up notification of import our $notification = $mw->Toplevel(); $notification->geometry('+400+400'); $notification->overrideredirect(1); $notification->withdraw; $notification->Label( -text => " Please wait, I am working... ", -foreground => 'white', -background => 'black', -height => 5 )->pack; display_notification(); #------------------------------------- # DOING THE LOADING HERE #------------------------------------- hide_notification(); } sub display_notification { $notification->deiconify; $notification->raise; } sub hide_notification { $notification->withdraw; }
How can I delay the pop-up window, let’s say I want to show it only if the loading time is more than 2 seconds? Should I use fork? Any idea would be very much appreciated. Thanks, Cla
In reply to Showing pop-up window after x-seconds processing by fanticla
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |