Advertisement
Guest User

Untitled

a guest
Feb 15th, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. from kivy.app import App
  2. from kivy.uix.textinput import TextInput
  3. from kivy.uix.boxlayout import BoxLayout
  4. from kivy.uix.floatlayout import FloatLayout
  5. from kivy.uix.scatter import Scatter
  6. from kivy.uix.label import Label
  7.  
  8. def printok():
  9. print("ok")
  10.  
  11. class MyFirstApp(App):
  12.  
  13. def build(self):
  14. layout = FloatLayout()
  15. scatter = Scatter()
  16. label = Label(text="Hello", font_size=150)
  17. box = BoxLayout(orientation='vertical')
  18. input = TextInput(
  19. font_size=200,
  20. size_hint_y=None,
  21. height=200)
  22.  
  23. layout.add_widget(scatter)
  24. scatter.add_widget(label)
  25.  
  26. box.add_widget(input)
  27. box.add_widget(layout)
  28. input.bind(text=printok)
  29.  
  30. return box
  31.  
  32. if __name__ == '__main__':
  33. MyFirstApp().run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement