Advertisement
Guest User

Untitled

a guest
Oct 11th, 2023
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. from tkinter import *
  2.  
  3. count = 0
  4.  
  5. def Labels():
  6. LabTx = StringVar()
  7. Lab = Label(Win, textvariable = LabTx)
  8. Lab.pack(side=RIGHT)
  9. if count >= 3:
  10. Lab.set("Enter the name of crime")
  11.  
  12.  
  13.  
  14.  
  15. def CLT():
  16. global GetIt
  17. TextBox.delete(0,END)
  18.  
  19.  
  20. def EnBT():
  21. global count
  22. global TextBox
  23. global GetIt
  24. GetIt = TextBox.get()
  25. count += 1
  26. print("ihh")
  27. CLT()
  28.  
  29.  
  30. def DTex():
  31. global TextBox
  32. TextBox = Entry()
  33. TextBox.pack(side=RIGHT)
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. Win = Tk()
  41. Win.geometry("350x400")
  42. Enter = Button(Win, text="Enter",command = EnBT)
  43. Enter.pack(side=RIGHT)
  44. DTex()
  45. Label()
  46.  
  47. Win.mainloop()
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement