Skip to content

Instantly share code, notes, and snippets.

@amirkheirabadi73
Created July 11, 2013 05:33
Show Gist options
  • Save amirkheirabadi73/5972772 to your computer and use it in GitHub Desktop.
Save amirkheirabadi73/5972772 to your computer and use it in GitHub Desktop.
Simple Login Screen
from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.uix.label import Label
from kivy.uix.textinput import TextInput
class LoginScreen(GridLayout):
def __init__(self , **kwarge):
super(LoginScreen,self).__init__(**kwarge)
self.cols = 2
self.add_widget(Label(text = "User Name :"))
self.username = TextInput(multiline = False)
self.add_widget(self.username)
self.add_widget(Label(text = "Password :"))
self.password = TextInput(multiline = False , password = True)
self.add_widget(self.password)
class MyApp(App):
def build(self):
return LoginScreen()
if __name__ == '__main__':
MyApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment