Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import kivy
- from kivy.app import App
- from kivy.uix.label import Label
- from kivy.uix.button import Button
- from kivy.uix.widget import Widget
- from kivy.uix.textinput import TextInput
- from kivy.uix.gridlayout import GridLayout
- from kivy.uix.floatlayout import FloatLayout
- from kivy.uix.boxlayout import BoxLayout
- from kivy.lang import Builder
- from kivy.core.window import Window
- class loginscreen(GridLayout):
- def __init__(self,**kwargs):
- super(loginscreen,self).__init__(**kwargs)
- self.cols=2
- self.label='Username'
- self.color=1,0,0,1
- for i in range(5):
- self.password=False
- if i is 1:
- self.label='Password'
- self.password=True
- elif i is 2:
- self.label='Email'
- elif i is 3:
- self.label='Email Password'
- self.password=True
- elif i is 4:
- self.label='Address'
- self.add_widget(Button(text=self.label,color=self.color))
- self.username=TextInput(multiline=False, password=self.password)
- self.add_widget(self.username)
- class app(App):
- def build(self):
- Window.clearcolor=(1,1,1,1)
- return loginscreen()
- if __name__=='__main__':
- app().run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement