Skip to content

Instantly share code, notes, and snippets.

@tshirtman
Created September 26, 2012 07:36
Show Gist options
  • Select an option

  • Save tshirtman/3786608 to your computer and use it in GitHub Desktop.

Select an option

Save tshirtman/3786608 to your computer and use it in GitHub Desktop.
from kivy.app import App
from kivy.clock import Clock
from kivy.uix.button import Button
class MyApp(App):
def build(self):
self.b = Button()
self.b.bind(on_press=self.reset_button)
return self.b
def reset_button(self, *l):
Clock.schedule_once(self._reset_button, 1)
def _reset_button(self, *l):
self.b.state = 'normal'
if __name__ == '__main__':
MyApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment