Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import kivy
- from kivy.uix.textinput import TextInput
- from kivy.uix.gridlayout import GridLayout
- from kivy.app import App
- from kivy.uix.label import Label
- class LoginScreen(Gridlayout):
- def __init__(self, **kwargs): super(LoginScreen, self).__init__(**kwargs)
- self.cols = 2
- self.add_widget(Label(text='UserName'))
- self.username=TextInput(multiline = False)
- self.add_widget(self.username)
- self.add_widget(Label(text=password))
- self.password = TextInput(password=True, multiline=False)
- self.add_widget(self.password)
- class MyApp(App):
- def build(self):
- return LoginScreen()
- #return Label(text = 'hello world')
- if __name__ == '__main__':
- MyApp().run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement