License GNU General Public License, version 2
Lines 11
Keywords
annoying (1) button (1) malicious (5) silly (1)
Included in this Library
Permissions
Owner: impiaaa
Viewable by Everyone
Editable by All Siafoo Users
Hide
Need a quick chart or graph for your blog? Try our reStructured Text renderer. Join Siafoo Now or Learn More

Running away button Atom Feed 2

In Brief I made this silly code in honor of the malicious week.... more
# 's
 1from Tkinter import *
2import random
3
4root = Tk()
5button = Button(root, text="Click me!")
6def movebutton(event):
7 global button
8 button.place(relx=random.random()*0.9, rely=random.random()*0.9)
9button.place(relx=0.4, rely=0.4)
10button.bind("<Enter>", movebutton)
11button.bind("<Motion>", movebutton)
12root.mainloop()

I made this silly code in honor of the malicious week.

It's not really malicious, but it can really bug your friends. :-)

Comments

over 7 years ago (19 Feb 2009 at 10:15 PM) by David Isaacson
I like it! I wonder how hard it would be to make it jump everywhere around the screen without appearing to be in a window, that would be *really* annoying!
over 7 years ago (23 Feb 2009 at 11:05 AM) by Spencer Ruport
Is there a focus event as well? Whenever I see one of these I just hit tab until it's selected and then hit enter.
over 7 years ago (23 Feb 2009 at 12:48 PM) by impiaaa
I've made a new version, I just need to post it...
over 7 years ago (23 Feb 2009 at 01:06 PM) by impiaaa
over 3 years ago (14 Dec 2012 at 04:57 AM) by shiva
Wow thats an awesome creation