Tk events
fluffyvoidwarrior
created: 2006-01-04 02:21:22
Hi Monks, I'm writing a win32 Tk app that loads a window and then carries out some fairly long winded processing without user interaction. I need the processing to start AFTER the gui is drawn so the user can see processing messages as they occur. I need to be able to respond to something like an onload or afterpageload event to trigger my processing subroutine after the window is drawn and not during or before. Thanks again
Re: Tk events
created: 2006-01-04 04:18:22

Tk::After might be interesting for you.

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

Re: Tk events
created: 2006-01-04 06:31:24
I think what you are looking for is waitVisibility. Try the script below, with the sleep statement in the different locations. You should see the way to go. Don't forget, that in your long-process without user interaction, you must include frequent $mw->update to update whatever display widgets you have.
#!/usr/bin/perl
use warnings;
use strict;
use Tk;

my $mw = tkinit;

#for(1..3){sleep 1}; 

#to wait until a $widget is visible, use waitVisibility: 
$mw->waitVisibility;

for(1..3){sleep 1};

MainLoop;

I'm not really a human, but I play one on earth. flash japh
Re^2: Tk events
created: 2006-01-04 07:14:07
Thanks

perlmonks.org content © perlmonks.org and fluffyvoidwarrior, strat, zentara

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03