Advertisement
johnpentyrch

Flashy

May 11th, 2020
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. from guizero import App,  PushButton
  2.  
  3. def blkwht():
  4.     if button1.bg != 'white':
  5.         button1.bg='white'
  6.         button1.text_color='black'
  7.     else:
  8.         button1.bg='black'
  9.         button1.text_color='white'
  10.  
  11. app = App("Flashing Button")
  12.  
  13. button1 = PushButton(app, text='Flashy')
  14. button1.bg='white'
  15. button1.repeat(1000, blkwht)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement