Posted By

maturanti19 on 05/22/19


Tagged

bind z Tkinter uzivatel slniecko textu ktore zada klik


Versions (?)

kliknes a vytvori ti slniecko z textu ktory zada uzivatel dole


 / Published in: Python
 

Pri kliku sa vypise slovo ktore zada uzivatel

  1. import tkinter
  2. canvas = tkinter.Canvas(height=600, width=800, bg='gainsboro')
  3. canvas.pack()
  4.  
  5. def slniecko(surad):
  6. t=button.get()
  7. x=surad.x
  8. y=surad.y
  9. f='Georgia 12 bold'
  10. for i in range(8):
  11. canvas.create_text(x,y, text=' '+t,fill='purple', angle=i*45 , font=f)
  12.  
  13.  
  14. button=tkinter.Entry()
  15. button.pack()
  16. canvas.bind('<Button-1>', slniecko)

Report this snippet  

You need to login to post a comment.