Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Tk April Fools

by Anonymous Monk
on Apr 02, 2008 at 13:47 UTC ( [id://677957]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Tk April Fools
in thread Tk April Fools

ier, bind the window movement to mouse movement, not on timer

Replies are listed 'Best First'.
Re^4: Tk April Fools
by zentara (Archbishop) on Apr 02, 2008 at 14:07 UTC
    Yeah, I think I saw a Japh like that, where you couldn't get the mouse over the window without it jumping. Something like:
    #!/usr/bin/perl use strict; use Tk; my $mw = new MainWindow(); $mw->geometry("100x100+100+100"); my $label1 = $mw->Label(-text => "Catch Me Fool", -bg => 'cyan')-> pack(-fill => 'both', -expand => 1,); #put stuff here $mw->bind("<Enter>",sub { my $x = int rand 600; my $y = int rand 600; $mw->geometry("+$x+$y"); }); MainLoop;

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum

      The mouse shy window trick has been around at least since the Mac+.


      Perl is environmentally friendly - it saves trees

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-16 11:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found