Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # alternating push button colour
- from guizero import App, PushButton
- def flash_button():
- if warning_button.bg == "white":
- warning_button.bg = "black"
- app.text_color = "white"
- else:
- warning_button.bg = "white"
- warning_button.text_color = "black"
- app = App("Flash Button", bg="white")
- # create an warning button
- warning_button = PushButton(app, text="WARNING")
- warning_button.repeat(1000, flash_button)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement