Skip to content
Snippets Groups Projects
Commit 593831a1 authored by Brady James Garvin's avatar Brady James Garvin
Browse files

Initial commit.

parents
No related branches found
No related tags found
No related merge requests found
*~
*.pyc
*.pyo
.idea
main.py 0 → 100644
from kivy.app import App
from kivy.properties import StringProperty
class TextClearingApp(App):
text = StringProperty('')
def clear_text(self):
self.text = ''
if __name__ == '__main__':
app = TextClearingApp()
app.run()
BoxLayout:
orientation: 'vertical'
TextInput:
text: app.text
on_text: app.text = self.text # Overrride the default Kivy behavior, which is to let the properties diverge.
Button:
text: 'Clear'
on_press: app.clear_text()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment