Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. from tkinter import *
  2. root = Tk()
  3. canvas = Canvas(root)
  4.  
  5. def system(system_name, position_x, position_y):
  6. Button(root, text = system_name).place(x=position_x, y=position_y, width=60, height=20)
  7.  
  8. # examples :
  9.  
  10. system("Location1", 10,10)
  11. system("Location2", 50,50)
  12.  
  13. canvas.grid()
  14. root.mainloop()
  15.  
  16. def line(system1, system2):
  17. system1 = center position of system1 = (a,b)
  18. system2 = center position of system2 = (c,d)
  19. canvas.create_line((a,b),(c,d))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement