Advertisement
Vesna_To

timer2

Aug 17th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. from guizero import *
  2.  
  3. def promijeni():
  4. if button.bg == "black":
  5. button.bg = "white"
  6. button.text_color = "black"
  7. button.text = "White"
  8. else:
  9. button.bg = "black"
  10. button.text_color = "white"
  11. button.text = "Black"
  12.  
  13.  
  14. app = App("Button background color")
  15. button = PushButton(app, text="OK")
  16. button.repeat(500, promijeni)
  17.  
  18. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement