Advertisement
virtualideaz

Simple Python Button Event

Oct 5th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. from tkinter import *
  2.  
  3. from tkinter import messagebox
  4.  
  5. top = Tk()
  6. top.geometry("100x100")
  7. def helloCallBack():
  8.    msg=messagebox.showinfo( "Hello World")
  9.  
  10. B = Button(top, text ="Hello", command = helloCallBack)
  11. B.place(x=50,y=50)
  12. top.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement