Skip to content

Instantly share code, notes, and snippets.

@driscollis
Last active June 6, 2021 18:49
Show Gist options
  • Save driscollis/dee58221dcb860be5731 to your computer and use it in GitHub Desktop.
Save driscollis/dee58221dcb860be5731 to your computer and use it in GitHub Desktop.
Kv Login example
<LoginScreen@GridLayout>:
my_username: username
my_password: password
rows: 2
cols: 2
padding: 5
spacing: 5
Label:
text: 'User Name:'
TextInput:
id: username
Label:
text: 'Password:'
TextInput:
id: password
password: True
# http://kivy.org/docs/gettingstarted/rules.html
from kivy.app import App
from kivy.uix.gridlayout import GridLayout
class LoginScreen(GridLayout):
pass
class LoginScreenApp(App):
def build(self):
screen = LoginScreen()
return screen
if __name__ == "__main__":
LoginScreenApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment