SHARE
TWEET

Untitled

sclnl Jan 25th, 2020 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from guizero import App, PushButton
  2.  
  3. def blink():
  4.         if (blinkingbutton.bg == "black"):
  5.                 blinkingbutton.bg = "white"
  6.                 blinkingbutton.text_color = "black"
  7.         else:
  8.                 blinkingbutton.bg = "black"
  9.                 blinkingbutton.text_color = "white"
  10.        
  11. app = App("blinking button")
  12.  
  13. blinkingbutton = PushButton(app, text="BLINKING BUTTON")
  14. blinkingbutton.bg = "white"
  15. blinkingbutton.text_color = "black"
  16. blinkingbutton.repeat(1000, blink)
  17.  
  18. app.display()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top