on click write python - Hightechrobo Bin
  PYTHON   86

on click write python

Guest on 30th April 2022 06:49:30 AM

  1. import tkinter as tk
  2. def printhello():
  3.     print('hello')
  4. m=tk.Tk()
  5. m.title('hello')
  6.  
  7. label = tk.Label(text="Write something")
  8. entry = tk.Entry()
  9.  
  10. text= tk.Text()
  11. def hell():
  12.     ff = entry.get()
  13.     text.delete(0, tk.END)
  14.     text.insert(0 , ff)
  15.  
  16.  
  17. button = tk.Button(
  18.     text="Click me!",
  19.     width=10,
  20.     height=1,
  21.     bg="blue",
  22.     fg="yellow",
  23.     command = hell
  24. )
  25.  
  26.  
  27.  
  28.  
  29.  
  30. label.pack()
  31. entry.pack()
  32. button.pack()
  33. text.pack()
  34.  
  35.  
  36.  
  37. m.mainloop()


Add Comment

* Required information
1000
Drag & drop images (max 3)
Enter the last letter of the word satellite.
Captcha Image
Powered by Commentics

Comments

No comments yet. Be the first!

Raw Paste


Login or Register to edit or fork this paste. It's free.