Skip to content

Instantly share code, notes, and snippets.

@sleepless-se
Created August 3, 2019 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sleepless-se/5c4b105605b7e63b5adcebde63db852d to your computer and use it in GitHub Desktop.
Save sleepless-se/5c4b105605b7e63b5adcebde63db852d to your computer and use it in GitHub Desktop.
Sample: Kiby input text update label with button
<Manual_insert>:
name: "manual"
BoxLayout:
TextInput:
id: name
Label:
text: root.text
Button:
text: "Update"
on_release:
root.update_info()
from kivy.app import App
from kivy.uix.screenmanager import Screen
from kivy.properties import StringProperty
class Manual_insert(Screen):
text = StringProperty('')
def update_info(self):
self.text = self.ids.name.text
print(self.text)
class TestApp(App):
def build(self):
return Manual_insert()
if __name__ == "__main__":
TestApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment