Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from guizero import *
- def promijeni():
- if button.bg == "black":
- button.bg = "white"
- button.text_color = "black"
- button.text = "White"
- else:
- button.bg = "black"
- button.text_color = "white"
- button.text = "Black"
- app = App("Button background color")
- button = PushButton(app, text="OK")
- button.repeat(500, promijeni)
- app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement