Advertisement
Guest User

belca

a guest
Feb 26th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. from tkinter import*
  2. tk=Tk()
  3. tk.geometry("260x370")
  4. ent = Entry(justify="right",font="14")
  5. ent.place(x=20,y=20,width=220,height=30)
  6. def BO_click():
  7. ent.insert(END,"0")
  8. BO=Button(text="0",font="14",command=BO_click)
  9. BO.place(x=20,y=310,width=100,height=40)
  10. def B7_click():
  11. ent.insert(END,"7")
  12. B7=Button(text="7",font="14",command=B7_click)
  13. B7.place(x=20,y=130,width=40,height=40)
  14. def BC_click():
  15. ent.delete(0,END)
  16. BC=Button(text="C",font="14",command=BC_click)
  17. BC.place(x=20,y=80,width=100,height=40)
  18. def B4_click():
  19. ent.insert(END,"4")
  20. B4=Button(text="4",font="14",command=B4_click)
  21. B4.place(x=20,y=180,width=40,height=40)
  22. def B1_click():
  23. ent.insert(END,"1")
  24. B1=Button(text="1",font="14",command=B1_click)
  25. B1.place(x=20,y=230,width=40,height=40)
  26. def B5_click():
  27. ent.insert(END,"5")
  28. B5=Button(text="5",font="14",command=B5_click)
  29. B5 .place(x=80,y=180,width=40,height=40)
  30. def B2_click():
  31. ent.insert(END,"2")
  32. B2=Button(text="2",font="14",command=B2_click)
  33. B2.place(x=80,y=230,width=40,height=40)
  34. def B8_click():
  35. ent.insert(END,"8")
  36. B8=Button(text="8",font="14",command=B8_click)
  37. B8.place(x=80,y=130,width=40,height=40)
  38.  
  39.  
  40. def B3_click():
  41. ent.insert(END,"3")
  42. B3=Button(text="3",font="14",command=B3_click)
  43. B3 .place(x=140,y=180,width=40,height=40)
  44. def B6_click():
  45. ent.insert(END,"6")
  46. B6=Button(text="6",font="14",command=B6_click)
  47. B6.place(x=140,y=230,width=40,height=40)
  48. def B9_click():
  49. ent.insert(END,"9")
  50. B9=Button(text="9",font="14",command=B9_click)
  51. B9.place(x=140,y=130,width=40,height=40)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement