Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Cursor in TK

by roju (Friar)
on Aug 19, 2004 at 16:19 UTC ( [id://384351]=note: print w/replies, xml ) Need Help??


in reply to Cursor in TK

If http://www.perltk.org/ptknews/5390.htm is to be believed, then it's as simple as,
$top->Busy; call_you_sub_here(); $top->Unbusy;

I haven't tested it however, so YMMV

Update: Tested with ActiveState 5.8.3 and the default Tk, and it works for me.

use Tk; my $mw = MainWindow->new; $mw->Button(-text => "Goodbye World!", -command =>sub{exit})->pack; $mw->Button(-text => "Act busy!", -command =>sub{$mw->Busy; sleep 1;$mw->Unbusy;}) ->pack; MainLoop;

Replies are listed 'Best First'.
Re^2: Cursor in TK
by Scarborough (Hermit) on Aug 19, 2004 at 16:27 UTC
    A combination of yours and the answer before and its working just fine.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-23 21:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found