Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from kivy.app import App
- from kivy.uix.textinput import TextInput
- from kivy.uix.boxlayout import BoxLayout
- from kivy.uix.floatlayout import FloatLayout
- from kivy.uix.scatter import Scatter
- from kivy.uix.label import Label
- def printok():
- print("ok")
- class MyFirstApp(App):
- def build(self):
- layout = FloatLayout()
- scatter = Scatter()
- label = Label(text="Hello", font_size=150)
- box = BoxLayout(orientation='vertical')
- input = TextInput(
- font_size=200,
- size_hint_y=None,
- height=200)
- layout.add_widget(scatter)
- scatter.add_widget(label)
- box.add_widget(input)
- box.add_widget(layout)
- input.bind(text=printok)
- return box
- if __name__ == '__main__':
- MyFirstApp().run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement