SHARE
TWEET

Untitled

a guest Jun 26th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. button = ImageTk.PhotoImage(file="button.png")
  2.  
  3. canvas = tk.Canvas(width=200, heigh=200, borderwidth=0, highlightthickness=0)
  4. canvas.grid()
  5. canvas.create_rectangle(0,0,199,199, fill="blue")
  6.  
  7. canvas.create_image(0,0, image=button, anchor="nw")
  8.      
  9. button = ImageTk.PhotoImage(file="button.png")
  10.  
  11. canvas = tk.Canvas(width=200, heigh=200, borderwidth=0, highlightthickness=0)
  12. canvas.grid()
  13. canvas.create_rectangle(0,0,199,199, fill="blue")
  14.  
  15. buton = tk.Button(root, image=button)
  16. canvas.create_window(0,0, window=buton, anchor="nw")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top